treewide: use less phases
if not necessary
This removes some skipping of e.g. fixupPhase and cleans up occurences where this led to duplicating code
This commit is contained in:
parent
72457cdebb
commit
28cc2642f0
|
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "1rc2nx8kj2lj13whxb9chhh79f4hmjjj4j1hpqsd0lbdb60jikrn";
|
||||
};
|
||||
|
||||
phases = ["unpackPhase" "installPhase"];
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/include
|
||||
|
|
|
@ -24,8 +24,6 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "1fgjgzss0ghk734xpfidazyknfdn11pmyw77pc3wigl83dvx4nb2";
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||
|
||||
unpackPhase = "${dpkg}/bin/dpkg-deb -x $src .";
|
||||
|
||||
installPhase =
|
||||
|
|
|
@ -4,10 +4,6 @@ stdenv.mkDerivation rec {
|
|||
name = "git-radar-${version}";
|
||||
version = "0.5";
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
dontInstallSrc = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "michaeldfallen";
|
||||
repo = "git-radar";
|
||||
|
@ -15,6 +11,8 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "1915aqx8bfc4xmvhx2gfxv72p969a6rn436kii9w4yi38hibmqv9";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp git-radar fetch.sh prompt.bash prompt.zsh radar-base.sh $out
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ stdenv, fetchurl
|
||||
, libsysfs, gnutls, openssl
|
||||
, libcap, sp, docbook_sgml_dtd_31
|
||||
, libcap, opensp, docbook_sgml_dtd_31
|
||||
, libidn, nettle
|
||||
, SGMLSpm, libgcrypt }:
|
||||
|
||||
|
@ -18,13 +18,15 @@ stdenv.mkDerivation rec {
|
|||
};
|
||||
|
||||
prePatch = ''
|
||||
sed -i s/sgmlspl/sgmlspl.pl/ doc/Makefile
|
||||
sed -e s/sgmlspl/sgmlspl.pl/ \
|
||||
-e s/nsgmls/onsgmls/ \
|
||||
-i doc/Makefile
|
||||
'';
|
||||
|
||||
makeFlags = "USE_GNUTLS=no";
|
||||
|
||||
buildInputs = [
|
||||
libsysfs openssl libcap sp docbook_sgml_dtd_31 SGMLSpm libgcrypt libidn nettle
|
||||
libsysfs opensp openssl libcap docbook_sgml_dtd_31 SGMLSpm libgcrypt libidn nettle
|
||||
];
|
||||
|
||||
buildFlags = "man all ninfod";
|
||||
|
|
|
@ -12,16 +12,15 @@ stdenv.mkDerivation {
|
|||
|
||||
buildInputs = [ txt2man makeWrapper ];
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
postPatch = "patchShebangs .";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/bin"
|
||||
mkdir -p "$out/share/man/man1"
|
||||
sed -i 's|/usr/bin/env bash|${bash}/bin/bash|' duply
|
||||
mv duply "$out/bin"
|
||||
install -vD duply "$out/bin"
|
||||
wrapProgram "$out/bin/duply" --set PATH \
|
||||
"${coreutils}/bin:${python}/bin:${duplicity}/bin:${gawk}/bin:${gnupg1}/bin:${bash}/bin:${gnugrep}/bin:${txt2man}/bin:${which}/bin"
|
||||
"$out/bin/duply" txt2man | gzip -c > "$out/share/man/man1/duply.1.gz"
|
||||
${stdenv.lib.makeBinPath [ coreutils python duplicity gawk gnupg1 bash gnugrep txt2man which ]}
|
||||
"$out/bin/duply" txt2man > "$out/share/man/man1/duply.1"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -12,10 +12,6 @@ stdenv.mkDerivation rec {
|
|||
owner = "facebook";
|
||||
};
|
||||
|
||||
# The Makefiles don't properly use file targets, but blindly rebuild
|
||||
# all dependencies on every make invocation. So no nice phases. :-(
|
||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||
|
||||
makeFlags = [
|
||||
"ZSTD_LEGACY_SUPPORT=${if legacySupport then "1" else "0"}"
|
||||
];
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{ stdenv, fetchFromGitHub, connman, dmenu }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "connman_dmenu-${version}";
|
||||
version = "git-29-9-2015";
|
||||
|
@ -12,10 +13,10 @@ stdenv.mkDerivation rec {
|
|||
|
||||
buildInputs = [ connman dmenu ];
|
||||
|
||||
phases = "unpackPhase patchPhase installPhase fixupPhase";
|
||||
dontBuild = true;
|
||||
|
||||
# remove root requirement, see: https://github.com/march-linux/connman_dmenu/issues/3
|
||||
patchPhase = ''
|
||||
postPatch = ''
|
||||
sed -i '89,92d' connman_dmenu
|
||||
'';
|
||||
|
||||
|
|
|
@ -13,14 +13,11 @@ stdenv.mkDerivation rec {
|
|||
|
||||
buildInputs = [ libsodium ];
|
||||
|
||||
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
|
||||
|
||||
buildPhase = "bash build.sh";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
rm out/quicktun*tgz
|
||||
cp -v out/quicktun* $out/bin/
|
||||
install -vD out/quicktun* -t $out/bin
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -11,15 +11,11 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "07m45bn9lzgbfihmxic23wqp73nxg5ihrvkigr450jq6gzvgwawq";
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
|
||||
|
||||
makeFlags = "-C src";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,sbin,share/man/man8}
|
||||
cp bin/ractl $out/bin
|
||||
cp bin/rad $out/sbin
|
||||
cp man/* $out/share/man/man8
|
||||
install -vD bin/* -t $out/bin
|
||||
install -vD man/* -t $out/share/man/man8
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -23,11 +23,9 @@ stdenv.mkDerivation rec {
|
|||
libkrb5 ldns libtool swig pkgs.pythonPackages.pip gnutls-kdh ]
|
||||
++ stdenv.lib.optional useSystemd systemd;
|
||||
|
||||
phases = [ "unpackPhase" "patchPhase" "postPatchPhase" "buildPhase" "installPhase" ];
|
||||
|
||||
patches = [ ./fixing-rpath.patch ./configvar-fix.patch ];
|
||||
|
||||
postPatchPhase = ''
|
||||
postPatch = ''
|
||||
substituteInPlace etc/tlspool.conf \
|
||||
--replace "dnssec_rootkey ../etc/root.key" "dnssec_rootkey $out/etc/root.key" \
|
||||
--replace "pkcs11_path /usr/local/lib/softhsm/libsofthsm2.so" "pkcs11_path ${softhsm}/lib/softhsm/libsofthsm2.so"
|
||||
|
|
|
@ -8,19 +8,13 @@ let mkPrefetchScript = tool: src: deps:
|
|||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
unpackPhase = ":";
|
||||
|
||||
local wrapArgs=""
|
||||
cp ${src} $out/bin/$name;
|
||||
for dep in ${stdenv.lib.concatStringsSep " " deps}; do
|
||||
wrapArgs="$wrapArgs --prefix PATH : $dep/bin"
|
||||
done
|
||||
wrapArgs="$wrapArgs --prefix PATH : ${gnused}/bin"
|
||||
wrapArgs="$wrapArgs --prefix PATH : ${nix.out}/bin" # For nix-hash
|
||||
wrapArgs="$wrapArgs --set HOME /homeless-shelter"
|
||||
wrapProgram $out/bin/$name $wrapArgs
|
||||
installPhase = ''
|
||||
install -vD ${src} $out/bin/$name;
|
||||
wrapProgram $out/bin/$name \
|
||||
--prefix PATH : ${stdenv.lib.makeBinPath (deps ++ [ gnused nix ])} \
|
||||
--set HOME /homeless-shelter
|
||||
'';
|
||||
|
||||
preferLocalBuild = true;
|
||||
|
@ -32,11 +26,11 @@ let mkPrefetchScript = tool: src: deps:
|
|||
};
|
||||
};
|
||||
in rec {
|
||||
nix-prefetch-bzr = mkPrefetchScript "bzr" ../../../build-support/fetchbzr/nix-prefetch-bzr [bazaar];
|
||||
nix-prefetch-cvs = mkPrefetchScript "cvs" ../../../build-support/fetchcvs/nix-prefetch-cvs [cvs];
|
||||
nix-prefetch-git = mkPrefetchScript "git" ../../../build-support/fetchgit/nix-prefetch-git [git coreutils];
|
||||
nix-prefetch-hg = mkPrefetchScript "hg" ../../../build-support/fetchhg/nix-prefetch-hg [mercurial];
|
||||
nix-prefetch-svn = mkPrefetchScript "svn" ../../../build-support/fetchsvn/nix-prefetch-svn [subversion.out];
|
||||
nix-prefetch-bzr = mkPrefetchScript "bzr" ../../../build-support/fetchbzr/nix-prefetch-bzr [ bazaar ];
|
||||
nix-prefetch-cvs = mkPrefetchScript "cvs" ../../../build-support/fetchcvs/nix-prefetch-cvs [ cvs ];
|
||||
nix-prefetch-git = mkPrefetchScript "git" ../../../build-support/fetchgit/nix-prefetch-git [ git coreutils ];
|
||||
nix-prefetch-hg = mkPrefetchScript "hg" ../../../build-support/fetchhg/nix-prefetch-hg [ mercurial ];
|
||||
nix-prefetch-svn = mkPrefetchScript "svn" ../../../build-support/fetchsvn/nix-prefetch-svn [ subversion ];
|
||||
|
||||
nix-prefetch-scripts = buildEnv {
|
||||
name = "nix-prefetch-scripts";
|
||||
|
|
|
@ -29,7 +29,6 @@ stdenv.mkDerivation rec {
|
|||
|
||||
nativeBuildInputs = [ upx patchelf ];
|
||||
|
||||
phases = "unpackPhase installPhase";
|
||||
unpackPhase = "tar xf ${src}";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
|
@ -41,6 +40,8 @@ stdenv.mkDerivation rec {
|
|||
$out/bin/jd-gui
|
||||
'';
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
meta = {
|
||||
description = "Fast Java Decompiler with powerful GUI";
|
||||
homepage = "http://jd.benow.ca/";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ stdenv, fetchurl, cmake, qt4, gdb, zlib }:
|
||||
stdenv.mkDerivation rec {
|
||||
{ stdenv, fetchurl, qt4, gdb, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "omapd-${version}";
|
||||
version = "0.9.2";
|
||||
|
||||
|
@ -11,23 +11,20 @@ stdenv.mkDerivation rec {
|
|||
|
||||
patches = [ ./zlib.patch ];
|
||||
|
||||
buildInputs = [ cmake qt4 zlib gdb ];
|
||||
|
||||
phases = [ "unpackPhase" "patchPhase" "buildPhase" "installPhase" ];
|
||||
buildInputs = [ qt4 zlib gdb ];
|
||||
|
||||
buildPhase = ''
|
||||
(cd plugins/RAMHashTables; qmake; make)
|
||||
qmake
|
||||
make
|
||||
'';
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out $out/bin $out/etc $out/usr/lib/omapd/plugins
|
||||
cp omapd $out/bin/.
|
||||
cp omapd.conf $out/etc/.
|
||||
cp plugins/libRAMHashTables.so $out/usr/lib/omapd/plugins/.
|
||||
install -vD omapd $out/bin/omapd
|
||||
install -vD omapd.conf $out/etc/omapd.conf
|
||||
install -vD plugins/libRAMHashTables.so $out/usr/lib/omapd/plugins/libRAMHashTables.so
|
||||
ln -s $out/usr/lib/omapd/plugins $out/bin/plugins
|
||||
'';
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://code.google.com/p/omapd;
|
||||
|
|
|
@ -25,15 +25,12 @@ stdenv.mkDerivation rec {
|
|||
TimeDate # == DateParse
|
||||
HTMLTemplate
|
||||
# IO::Socket::Socks is not in nixpkgs
|
||||
# IOSocketSocks
|
||||
# IOSocketSocks
|
||||
IOSocketSSL
|
||||
NetSSLeay
|
||||
SOAPLite
|
||||
]);
|
||||
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" "patchPhase" "postInstall" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
# I user `cd` rather than `cp $out/* ...` b/c the * breaks syntax
|
||||
|
@ -42,11 +39,7 @@ stdenv.mkDerivation rec {
|
|||
cp -r * $out/bin
|
||||
cd $out/bin
|
||||
chmod +x *.pl
|
||||
'';
|
||||
|
||||
patchPhase = "patchShebangs $out";
|
||||
|
||||
postInstall = ''
|
||||
find $out -name '*.pl' -executable | while read path; do
|
||||
wrapProgram "$path" \
|
||||
--prefix PERL5LIB : $PERL5LIB:$out/bin \
|
||||
|
@ -66,6 +59,4 @@ stdenv.mkDerivation rec {
|
|||
# http://getpopfile.org/docs/faq:systemrequirements
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -11943,7 +11943,6 @@ with pkgs;
|
|||
iproute = callPackage ../os-specific/linux/iproute { };
|
||||
|
||||
iputils = callPackage ../os-specific/linux/iputils {
|
||||
sp = spCompat;
|
||||
inherit (perlPackages) SGMLSpm;
|
||||
};
|
||||
|
||||
|
|
|
@ -6925,6 +6925,8 @@ in {
|
|||
|
||||
propagatedBuildInputs = with self; [ six pycrypto ];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "libthumbor is the python extension to thumbor";
|
||||
homepage = http://github.com/heynemann/libthumbor;
|
||||
|
|
Loading…
Reference in a new issue