mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
patchutils: enable structuredAttrs, use finalAttrs
This commit is contained in:
@@ -10,12 +10,12 @@
|
||||
extraBuildInputs ? [ ],
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "patchutils";
|
||||
inherit version patches;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cyberelk.net/tim/data/patchutils/stable/${pname}-${version}.tar.xz";
|
||||
url = "https://cyberelk.net/tim/data/patchutils/stable/patchutils-${finalAttrs.version}.tar.xz";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
@@ -37,19 +37,21 @@ stdenv.mkDerivation rec {
|
||||
done
|
||||
'';
|
||||
|
||||
doCheck = lib.versionAtLeast version "0.3.4";
|
||||
doCheck = lib.versionAtLeast finalAttrs.version "0.3.4";
|
||||
|
||||
preCheck = ''
|
||||
patchShebangs tests
|
||||
chmod +x scripts/*
|
||||
''
|
||||
+ lib.optionalString (lib.versionOlder version "0.4.2") ''
|
||||
+ lib.optionalString (lib.versionOlder finalAttrs.version "0.4.2") ''
|
||||
find tests -type f -name 'run-test' \
|
||||
-exec sed -i '{}' -e 's|/bin/echo|echo|g' \;
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
meta = {
|
||||
description = "Tools to manipulate patch files";
|
||||
homepage = "http://cyberelk.net/tim/software/patchutils";
|
||||
@@ -57,4 +59,4 @@ stdenv.mkDerivation rec {
|
||||
platforms = lib.platforms.all;
|
||||
maintainers = with lib.maintainers; [ artturin ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user