summary refs log tree commit diff
path: root/pkgs/os-specific/linux/earlyoom
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2018-09-10 13:22:24 +0100
committerJörg Thalheim <Mic92@users.noreply.github.com>2018-09-10 13:22:24 +0100
commitac679e721f257b408006fd88645c0738799e0b4c (patch)
tree10420d263d0cc0735d6095fefd1aa7761d0c36d7 /pkgs/os-specific/linux/earlyoom
parente7187212c3e0347e33e7e23e188d5152dd483eca (diff)
downloadnixpkgs-ac679e721f257b408006fd88645c0738799e0b4c.tar
nixpkgs-ac679e721f257b408006fd88645c0738799e0b4c.tar.gz
nixpkgs-ac679e721f257b408006fd88645c0738799e0b4c.tar.bz2
nixpkgs-ac679e721f257b408006fd88645c0738799e0b4c.tar.lz
nixpkgs-ac679e721f257b408006fd88645c0738799e0b4c.tar.xz
nixpkgs-ac679e721f257b408006fd88645c0738799e0b4c.tar.zst
nixpkgs-ac679e721f257b408006fd88645c0738799e0b4c.zip
earlyoom: fix version number (#46481)
earlyoom's Makefile attempts to detect the current version using git,
but we don't keep .git in its source, so this fails. We can however
set the VERSION environment variable to override this, as we now do.
Diffstat (limited to 'pkgs/os-specific/linux/earlyoom')
-rw-r--r--pkgs/os-specific/linux/earlyoom/default.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/os-specific/linux/earlyoom/default.nix b/pkgs/os-specific/linux/earlyoom/default.nix
index 081996dfd42..52333c109ee 100644
--- a/pkgs/os-specific/linux/earlyoom/default.nix
+++ b/pkgs/os-specific/linux/earlyoom/default.nix
@@ -1,19 +1,19 @@
 { lib, stdenv, fetchFromGitHub }:
 
 stdenv.mkDerivation rec {
-  name = "earlyoom-${version}";
-  version = "0.11";
+  name = "earlyoom-${VERSION}";
+  # This environment variable is read by make to set the build version.
+  VERSION = "0.11";
 
   src = fetchFromGitHub {
     owner = "rfjakob";
     repo = "earlyoom";
-    rev = "08b7ed8e72feed2eec2e558ba2cfacbf6d469594";
+    rev = "v${VERSION}";
     sha256 = "1k3xslb70fzk80wlka32l0k2v45qn1xgwyjkjiz85gv6v4mv92vl";
   };
 
   installPhase = ''
-    mkdir -p $out/bin
-    cp earlyoom $out/bin
+    install -D earlyoom $out/bin/earlyoom
   '';
 
   meta = {