nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 pkg-config,
6 libX11,
7 xorgproto,
8 writeScript,
9}:
10stdenv.mkDerivation (finalAttrs: {
11 pname = "ico";
12 version = "1.0.6";
13
14 src = fetchurl {
15 url = "mirror://xorg/individual/app/ico-${finalAttrs.version}.tar.xz";
16 hash = "sha256-OPNp1DHnUygP3nD6SJzJTOIE+fjqvS9J/H0yr6afRAU=";
17 };
18
19 strictDeps = true;
20
21 nativeBuildInputs = [ pkg-config ];
22
23 buildInputs = [
24 libX11
25 xorgproto
26 ];
27
28 passthru = {
29 updateScript = writeScript "update-${finalAttrs.pname}" ''
30 #!/usr/bin/env nix-shell
31 #!nix-shell -i bash -p common-updater-scripts
32 version="$(list-directory-versions --pname ${finalAttrs.pname} \
33 --url https://xorg.freedesktop.org/releases/individual/app/ \
34 | sort -V | tail -n1)"
35 update-source-version ${finalAttrs.pname} "$version"
36 '';
37 };
38
39 meta = {
40 description = "Simple animation program that may be used for testing various X11 operations and extensions";
41 homepage = "https://gitlab.freedesktop.org/xorg/app/ico";
42 license = with lib.licenses; [
43 x11
44 hpnd
45 hpndSellVariant
46 ];
47 mainProgram = "ico";
48 maintainers = [ ];
49 platforms = lib.platforms.unix;
50 };
51})