2023-11-19 11:18:52 +00:00
|
|
|
{
|
2023-11-19 11:24:10 +00:00
|
|
|
callPackage,
|
2023-11-19 11:18:52 +00:00
|
|
|
lib,
|
|
|
|
haskell,
|
|
|
|
haskellPackages,
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
hsPkg = haskellPackages.changelog-d;
|
|
|
|
|
2023-11-19 12:17:23 +00:00
|
|
|
addCompletions = haskellPackages.generateOptparseApplicativeCompletions ["changelog-d"];
|
|
|
|
|
|
|
|
haskellModifications =
|
|
|
|
lib.flip lib.pipe [
|
|
|
|
addCompletions
|
|
|
|
haskell.lib.justStaticExecutables
|
|
|
|
];
|
2023-11-19 11:18:52 +00:00
|
|
|
|
|
|
|
mkDerivationOverrides = finalAttrs: oldAttrs: {
|
|
|
|
|
|
|
|
version = oldAttrs.version + "-git-${lib.strings.substring 0 7 oldAttrs.src.rev}";
|
|
|
|
|
2023-11-19 11:31:54 +00:00
|
|
|
# nix-shell ./maintainers/scripts/update.nix --argstr package changelog-d
|
2023-11-19 11:28:03 +00:00
|
|
|
passthru.updateScript = lib.getExe (callPackage ./updateScript.nix { });
|
2023-11-19 11:31:54 +00:00
|
|
|
|
|
|
|
# nix-build -A changelog-d.tests
|
2023-11-19 11:18:52 +00:00
|
|
|
passthru.tests = {
|
2023-11-19 11:24:10 +00:00
|
|
|
basic = callPackage ./tests/basic.nix { changelog-d = finalAttrs.finalPackage; };
|
2023-11-19 11:18:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = oldAttrs.meta // {
|
|
|
|
homepage = "https://codeberg.org/fgaz/changelog-d";
|
|
|
|
maintainers = [ lib.maintainers.roberth ];
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
in
|
|
|
|
(haskellModifications hsPkg).overrideAttrs mkDerivationOverrides
|