{ stdenv, coreutils, pxz, nix, perl, perlPackages }: let inherit (stdenv.lib) makeBinPath ; in stdenv.mkDerivation { name = "nix-serve"; src = "${./nix-serve.psgi}"; buildInputs = [ pxz perl nix ] ++ (with perlPackages; [ DBI DBDSQLite Plack Starman ]); phases = [ "installPhase" ]; installPhase = '' mkdir -p $out/libexec/nix-serve cat "$src" > "$out/libexec/nix-serve.psgi" mkdir -p $out/bin cat > $out/bin/nix-serve <