1be0098156
GitOrigin-RevId: 667e5581d16745bcda791300ae7e2d73f49fff25
40 lines
1,006 B
Nix
40 lines
1,006 B
Nix
{ substituteAll
|
|
, diffutils
|
|
, stdenv
|
|
, patchPpdFilesHook
|
|
}:
|
|
|
|
let
|
|
input = substituteAll {
|
|
src = ./test.ppd;
|
|
keep = "cmp";
|
|
patch = "cmp";
|
|
pathkeep = "/bin/cmp";
|
|
pathpatch = "/bin/cmp";
|
|
};
|
|
|
|
output = substituteAll {
|
|
src = ./test.ppd;
|
|
keep = "cmp";
|
|
patch = "${diffutils}/bin/cmp";
|
|
pathkeep = "/bin/cmp";
|
|
pathpatch = "${diffutils}/bin/cmp";
|
|
};
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
name = "${patchPpdFilesHook.name}-test";
|
|
buildInputs = [ diffutils ];
|
|
nativeBuildInputs = [ diffutils patchPpdFilesHook ];
|
|
dontUnpack = true;
|
|
dontInstall = true;
|
|
ppdFileCommands = [ "cmp" ];
|
|
preFixup = ''
|
|
install -D "${input}" "${placeholder "out"}/share/cups/model/test.ppd"
|
|
install -D "${input}" "${placeholder "out"}/share/ppds/test.ppd"
|
|
'';
|
|
postFixup = ''
|
|
diff --color --report-identical-files "${output}" "${placeholder "out"}/share/cups/model/test.ppd"
|
|
diff --color --report-identical-files "${output}" "${placeholder "out"}/share/ppds/test.ppd"
|
|
'';
|
|
}
|