Skip to content

Commit f727604

Browse files
authored
font-alias: switch from fetchurl to fetchFromGitLab (#435403)
2 parents d51cc2f + 41e0112 commit f727604

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

pkgs/by-name/fo/font-alias/package.nix

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,36 @@
11
{
22
lib,
33
stdenv,
4-
fetchurl,
5-
writeScript,
4+
fetchFromGitLab,
5+
gitUpdater,
6+
autoreconfHook,
7+
font-util,
8+
util-macros,
69
}:
710

811
stdenv.mkDerivation (finalAttrs: {
912
pname = "font-alias";
1013
version = "1.0.5";
1114

12-
src = fetchurl {
13-
url = "mirror://xorg/individual/font/font-alias-${finalAttrs.version}.tar.xz";
14-
hash = "sha256-n4niF7tz4ONjagpJP7+LfJlRVuDFPZoEdtIBtnwta24=";
15+
src = fetchFromGitLab {
16+
domain = "gitlab.freedesktop.org";
17+
group = "xorg";
18+
owner = "font";
19+
repo = "alias";
20+
tag = "font-alias-${finalAttrs.version}";
21+
hash = "sha256-qglRNSt/PgFprpsvOVCeLMA+YagJw8DZMAfFdZ0m0/s=";
1522
};
1623

17-
passthru = {
18-
updateScript = writeScript "update-${finalAttrs.pname}" ''
19-
#!/usr/bin/env nix-shell
20-
#!nix-shell -i bash -p common-updater-scripts
21-
22-
version="$(list-directory-versions --pname ${finalAttrs.pname} \
23-
--url https://xorg.freedesktop.org/releases/individual/font/ \
24-
| sort -V | tail -n1)"
24+
nativeBuildInputs = [
25+
autoreconfHook
26+
font-util
27+
util-macros
28+
];
2529

26-
update-source-version ${finalAttrs.pname} "$version"
27-
'';
30+
passthru = {
31+
updateScript = gitUpdater {
32+
rev-prefix = "font-alias-";
33+
};
2834
};
2935

3036
meta = {

0 commit comments

Comments
 (0)