nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 57 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 pkg-config, 6 xorgproto, 7 libxaw, 8 libxmu, 9 libxt, 10 wrapWithXFileSearchPathHook, 11 writeScript, 12}: 13stdenv.mkDerivation (finalAttrs: { 14 pname = "viewres"; 15 version = "1.0.8"; 16 17 src = fetchurl { 18 url = "mirror://xorg/individual/app/viewres-${finalAttrs.version}.tar.xz"; 19 hash = "sha256-SyIcKxAzkLFmYzYSuav4A2y76QYF29ijfPKjd/orbNI="; 20 }; 21 22 strictDeps = true; 23 24 nativeBuildInputs = [ 25 pkg-config 26 wrapWithXFileSearchPathHook 27 ]; 28 29 buildInputs = [ 30 xorgproto 31 libxaw 32 libxmu 33 libxt 34 ]; 35 36 installFlags = [ "appdefaultdir=$(out)/share/X11/app-defaults" ]; 37 38 passthru = { 39 updateScript = writeScript "update-${finalAttrs.pname}" '' 40 #!/usr/bin/env nix-shell 41 #!nix-shell -i bash -p common-updater-scripts 42 version="$(list-directory-versions --pname ${finalAttrs.pname} \ 43 --url https://xorg.freedesktop.org/releases/individual/app/ \ 44 | sort -V | tail -n1)" 45 update-source-version ${finalAttrs.pname} "$version" 46 ''; 47 }; 48 49 meta = { 50 description = "Displays a tree showing the widget class hierarchy of the Athena Widget Set (libxaw)"; 51 homepage = "https://gitlab.freedesktop.org/xorg/app/viewres"; 52 license = lib.licenses.x11; 53 mainProgram = "viewres"; 54 maintainers = [ ]; 55 platforms = lib.platforms.unix; 56 }; 57})