mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 23:22:37 +00:00
nix-serve: set PATH
joachifm: also set `dontBuild = true`; `false` doesn't make any sense if the intent is to skip the build phase. Closes #16221
This commit is contained in:
parent
c7016de72c
commit
d20a8ddea8
@ -1,23 +1,28 @@
|
||||
{ lib, stdenv, fetchFromGitHub, perl, nix, perlPackages }:
|
||||
{ stdenv, fetchFromGitHub,
|
||||
bzip2, nix, perl, perlPackages,
|
||||
}:
|
||||
|
||||
let rev = "7e09caa2a7a435aeb2cd5446aa590d6f9ae1699d"; in
|
||||
with stdenv.lib;
|
||||
|
||||
let
|
||||
rev = "7e09caa2a7a435aeb2cd5446aa590d6f9ae1699d";
|
||||
sha256 = "0mjzsiknln3isdri9004wwjjjpak5fj8ncizyncf5jv7g4m4q1pj";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "nix-serve-0.2-${lib.substring 0 7 rev}";
|
||||
name = "nix-serve-0.2-${substring 0 7 rev}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "edolstra";
|
||||
repo = "nix-serve";
|
||||
inherit rev;
|
||||
sha256 = "0mjzsiknln3isdri9004wwjjjpak5fj8ncizyncf5jv7g4m4q1pj";
|
||||
inherit rev sha256;
|
||||
};
|
||||
|
||||
buildInputs = [ perl nix ]
|
||||
buildInputs = [ bzip2 perl nix ]
|
||||
++ (with perlPackages; [ DBI DBDSQLite Plack Starman ]);
|
||||
|
||||
dontBuild = false;
|
||||
dontBuild = true;
|
||||
|
||||
# FIXME: unfortunate cut&paste.
|
||||
installPhase = ''
|
||||
mkdir -p $out/libexec/nix-serve
|
||||
cp nix-serve.psgi $out/libexec/nix-serve/nix-serve.psgi
|
||||
@ -25,7 +30,7 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $out/bin
|
||||
cat > $out/bin/nix-serve <<EOF
|
||||
#! ${stdenv.shell}
|
||||
PERL5LIB=$PERL5LIB exec ${perlPackages.Starman}/bin/starman $out/libexec/nix-serve/nix-serve.psgi "\$@"
|
||||
PATH=${makeBinPath [ bzip2 nix ]}:\$PATH PERL5LIB=$PERL5LIB exec ${perlPackages.Starman}/bin/starman $out/libexec/nix-serve/nix-serve.psgi "\$@"
|
||||
EOF
|
||||
chmod +x $out/bin/nix-serve
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user