summary refs log tree commit diff
path: root/pkgs/os-specific/linux/lsb-release
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2017-10-04 17:35:45 -0500
committerWill Dietz <w@wdtz.org>2017-10-06 08:57:23 -0500
commit78785a06f99d20ae86479c4f6896463f812e2760 (patch)
tree298658e4e870eaee97567d692b3147a63633619a /pkgs/os-specific/linux/lsb-release
parentc42b878ed376182e0c3db0262388877d1445870b (diff)
downloadnixpkgs-78785a06f99d20ae86479c4f6896463f812e2760.tar
nixpkgs-78785a06f99d20ae86479c4f6896463f812e2760.tar.gz
nixpkgs-78785a06f99d20ae86479c4f6896463f812e2760.tar.bz2
nixpkgs-78785a06f99d20ae86479c4f6896463f812e2760.tar.lz
nixpkgs-78785a06f99d20ae86479c4f6896463f812e2760.tar.xz
nixpkgs-78785a06f99d20ae86479c4f6896463f812e2760.tar.zst
nixpkgs-78785a06f99d20ae86479c4f6896463f812e2760.zip
lsb-release: wrap to ensure needed utilities are available
Diffstat (limited to 'pkgs/os-specific/linux/lsb-release')
-rw-r--r--pkgs/os-specific/linux/lsb-release/default.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/lsb-release/default.nix b/pkgs/os-specific/linux/lsb-release/default.nix
index 9715f77f9e4..34dae105a8d 100644
--- a/pkgs/os-specific/linux/lsb-release/default.nix
+++ b/pkgs/os-specific/linux/lsb-release/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, perl, getopt }:
+{ stdenv, fetchurl, perl, coreutils, getopt, makeWrapper }:
 
 stdenv.mkDerivation rec {
   version = "1.4";
@@ -16,7 +16,14 @@ stdenv.mkDerivation rec {
 
   installFlags = [ "prefix=$(out)" ];
 
-  buildInputs = [ perl getopt ];
+  nativeBuildInputs  = [ makeWrapper perl ];
+
+  buildInputs = [ coreutils getopt ];
+
+  # Ensure utilities used are available
+  preFixup = ''
+    wrapProgram $out/bin/lsb_release --prefix PATH : ${stdenv.lib.makeBinPath [ coreutils getopt ]}
+  '';
 
   meta = {
     description = "Prints certain LSB (Linux Standard Base) and Distribution information";