From 798e0f50f4dd6d26da285a851d1cd08665f60ae5 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Sat, 18 Feb 2017 19:21:11 -0600 Subject: [PATCH] creduce: Use wrapper instead of propagatedUserEnvPkgs Friendlier when installed, fixes execution outside of NixOS. --- pkgs/development/tools/misc/creduce/default.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkgs/development/tools/misc/creduce/default.nix b/pkgs/development/tools/misc/creduce/default.nix index a9296adf3343..d768f68576c5 100644 --- a/pkgs/development/tools/misc/creduce/default.nix +++ b/pkgs/development/tools/misc/creduce/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cmake +{ stdenv, fetchurl, cmake, makeWrapper , llvm, clang-unwrapped , flex , zlib @@ -21,9 +21,10 @@ stdenv.mkDerivation rec { # Ensure stdenv's CC is on PATH before clang-unwrapped stdenv.cc # Actual deps: - cmake + cmake makeWrapper llvm clang-unwrapped flex zlib + perl ExporterLite FileWhich GetoptTabular RegexpCommon TermReadKey ]; # On Linux, c-reduce's preferred way to reason about @@ -34,15 +35,13 @@ stdenv.mkDerivation rec { lscpu ${utillinux}/bin/lscpu ''; - perlDeps = [ - perl ExporterLite FileWhich GetoptTabular RegexpCommon TermReadKey - ]; - - propagatedNativeBuildInputs = perlDeps; - propagatedUserEnvPkgs = perlDeps; enableParallelBuilding = true; + postInstall = '' + wrapProgram $out/bin/creduce --prefix PERL5LIB : "$PERL5LIB" + ''; + meta = with stdenv.lib; { description = "A C program reducer"; homepage = "https://embed.cs.utah.edu/creduce";