figlet: modernize package
1. Add `meta.mainProgram`. 2. Use `finalAttrs` instead of `rec`. 3. Update hashes to the new style.
This commit is contained in:
parent
f6615dc1ae
commit
0104c3cb70
@ -5,15 +5,14 @@
|
|||||||
fetchpatch,
|
fetchpatch,
|
||||||
fetchzip,
|
fetchzip,
|
||||||
}:
|
}:
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "figlet";
|
pname = "figlet";
|
||||||
version = "2.2.5";
|
version = "2.2.5";
|
||||||
|
|
||||||
# some tools can be found here ftp://ftp.figlet.org/pub/figlet/util/
|
# some tools can be found here ftp://ftp.figlet.org/pub/figlet/util/
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "ftp://ftp.figlet.org/pub/figlet/program/unix/figlet-${version}.tar.gz";
|
url = "ftp://ftp.figlet.org/pub/figlet/program/unix/figlet-${finalAttrs.version}.tar.gz";
|
||||||
sha256 = "0za1ax15x7myjl8jz271ybly8ln9kb9zhm1gf6rdlxzhs07w925z";
|
sha256 = "sha256-v4jED9Dwd9qycS9U+NOayVLk6fLhiC8Rlb6eXkJXQX0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
contributed = fetchzip {
|
contributed = fetchzip {
|
||||||
@ -25,12 +24,12 @@ stdenv.mkDerivation rec {
|
|||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
url = "https://git.alpinelinux.org/aports/plain/main/figlet/musl-fix-cplusplus-decls.patch?h=3.4-stable&id=71776c73a6f04b6f671430f702bcd40b29d48399";
|
url = "https://git.alpinelinux.org/aports/plain/main/figlet/musl-fix-cplusplus-decls.patch?h=3.4-stable&id=71776c73a6f04b6f671430f702bcd40b29d48399";
|
||||||
name = "musl-fix-cplusplus-decls.patch";
|
name = "musl-fix-cplusplus-decls.patch";
|
||||||
sha256 = "1720zgrfk9makznqkbjrnlxm7nnhk6zx7g458fv53337n3g3zn7j";
|
sha256 = "sha256-8tg/3rBnjFG2Q4W807+Z0NpTO7VZrontn6qm6fL7QJw=";
|
||||||
})
|
})
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
url = "https://github.com/cmatsuoka/figlet/commit/9a50c1795bc32e5a698b855131ee87c8d7762c9e.patch";
|
url = "https://github.com/cmatsuoka/figlet/commit/9a50c1795bc32e5a698b855131ee87c8d7762c9e.patch";
|
||||||
name = "unistd-on-darwin.patch";
|
name = "unistd-on-darwin.patch";
|
||||||
sha256 = "hyfY87N+yuAwjsBIjpgvcdJ1IbzlR4A2yUJQSzShCRI=";
|
sha256 = "sha256-hyfY87N+yuAwjsBIjpgvcdJ1IbzlR4A2yUJQSzShCRI=";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -40,7 +39,7 @@ stdenv.mkDerivation rec {
|
|||||||
"LD:=$(CC)"
|
"LD:=$(CC)"
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = "cp -ar ${contributed}/* $out/share/figlet/";
|
postInstall = "cp -ar ${finalAttrs.contributed}/* $out/share/figlet/";
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
@ -50,5 +49,6 @@ stdenv.mkDerivation rec {
|
|||||||
license = lib.licenses.afl21;
|
license = lib.licenses.afl21;
|
||||||
maintainers = with lib.maintainers; [ ehmry ];
|
maintainers = with lib.maintainers; [ ehmry ];
|
||||||
platforms = lib.platforms.unix;
|
platforms = lib.platforms.unix;
|
||||||
|
mainProgram = "figlet";
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user