From cc27bd06339283a8189de5c4b1a981bd9c85c211 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 6 Dec 2022 18:00:10 +0100 Subject: [PATCH] .version: Add newline --- .version | 2 +- flake.nix | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.version b/.version index a3ebb9f51..fb2c0766b 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -2.13.0 \ No newline at end of file +2.13.0 diff --git a/flake.nix b/flake.nix index d9d01da10..38b469fdb 100644 --- a/flake.nix +++ b/flake.nix @@ -9,14 +9,15 @@ let - version = builtins.readFile ./.version + versionSuffix; + officialRelease = false; + + version = strip (builtins.readFile ./.version) + versionSuffix; + strip = nixpkgs.lib.removeSuffix "\n"; versionSuffix = if officialRelease then "" else "pre${builtins.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101")}_${self.shortRev or "dirty"}"; - officialRelease = false; - linux64BitSystems = [ "x86_64-linux" "aarch64-linux" ]; linuxSystems = linux64BitSystems ++ [ "i686-linux" ]; systems = linuxSystems ++ [ "x86_64-darwin" "aarch64-darwin" ];