Merge pull request #87722 from NixOS/f/jdupes

jdupes: build with additional hardening
This commit is contained in:
Peter Hoeg 2020-05-15 00:27:32 +08:00 committed by GitHub
commit a5b42d64ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,8 +15,11 @@ stdenv.mkDerivation rec {
extraPostFetch = "rm -r $out/testdir"; extraPostFetch = "rm -r $out/testdir";
}; };
dontConfigure = true;
makeFlags = [ makeFlags = [
"PREFIX=${placeholder "out"}" "PREFIX=${placeholder "out"}"
"HARDEN=1"
] ++ stdenv.lib.optionals stdenv.isLinux [ ] ++ stdenv.lib.optionals stdenv.isLinux [
"ENABLE_DEDUPE=1" "ENABLE_DEDUPE=1"
"STATIC_DEDUPE_H=1" "STATIC_DEDUPE_H=1"
@ -27,7 +30,7 @@ stdenv.mkDerivation rec {
doCheck = false; # broken Makefile, the above also removes tests doCheck = false; # broken Makefile, the above also removes tests
postInstall = '' postInstall = ''
install -Dm644 -t $out/share/doc/jdupes CHANGES LICENSE README.md install -Dm444 -t $out/share/doc/jdupes CHANGES LICENSE README.md
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
@ -40,6 +43,5 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/jbruchon/jdupes"; homepage = "https://github.com/jbruchon/jdupes";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ romildo ]; maintainers = with maintainers; [ romildo ];
platforms = platforms.all;
}; };
} }