diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-04-01 00:20:12 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-04-01 00:20:12 +0200 |
commit | 36c34c3b1fff93139a4016845711bcc05ebb7cf5 (patch) | |
tree | 68edc5f8539c2a8938e8988f4ea5ae3a5184f907 | |
parent | 4fdec5f61d5eef5f78ecfd7cbfea491979f15ac9 (diff) |
Set version properly
-rw-r--r-- | flake.nix | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -9,11 +9,11 @@ let - version = - builtins.readFile ./.version - + (if officialRelease - then "" - else "pre${builtins.substring 0 8 self.lastModified}_${self.shortRev or "dirty"}"); + version = builtins.readFile ./.version + versionSuffix; + versionSuffix = + if officialRelease + then "" + else "pre${builtins.substring 0 8 self.lastModified}_${self.shortRev or "dirty"}"; officialRelease = false; @@ -116,6 +116,8 @@ src = self; + VERSION_SUFFIX = versionSuffix; + outputs = [ "out" "dev" "doc" ]; buildInputs = buildDeps; |