nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 86 lines 2.1 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, gitUpdater 5, gdk-pixbuf 6, gnome-themes-extra 7, gtk-engine-murrine 8, jdupes 9, librsvg 10, sassc 11, which 12, themeVariants ? [] # default: blue 13, colorVariants ? [] # default: all 14, tweaks ? [] 15}: 16 17let 18 pname = "qogir-theme"; 19 20in 21lib.checkListOfEnum "${pname}: theme variants" [ "default" "manjaro" "ubuntu" "all" ] themeVariants 22lib.checkListOfEnum "${pname}: color variants" [ "standard" "light" "dark" ] colorVariants 23lib.checkListOfEnum "${pname}: tweaks" [ "image" "square" "round" ] tweaks 24 25stdenv.mkDerivation rec { 26 inherit pname; 27 version = "2023-05-24"; 28 29 src = fetchFromGitHub { 30 owner = "vinceliuice"; 31 repo = pname; 32 rev = version; 33 sha256 = "L19pbmJJFr1xi4ZTp0ocxmdMvWmtkK2zquOFfbV+P5Q="; 34 }; 35 36 nativeBuildInputs = [ 37 jdupes 38 sassc 39 which 40 ]; 41 42 buildInputs = [ 43 gdk-pixbuf # pixbuf engine for Gtk2 44 gnome-themes-extra # adwaita engine for Gtk2 45 librsvg # pixbuf loader for svg 46 ]; 47 48 propagatedUserEnvPkgs = [ 49 gtk-engine-murrine # murrine engine for Gtk2 50 ]; 51 52 postPatch = '' 53 patchShebangs install.sh clean-old-theme.sh 54 ''; 55 56 installPhase = '' 57 runHook preInstall 58 59 mkdir -p $out/share/themes 60 61 name= HOME="$TMPDIR" ./install.sh \ 62 ${lib.optionalString (themeVariants != []) "--theme " + builtins.toString themeVariants} \ 63 ${lib.optionalString (colorVariants != []) "--color " + builtins.toString colorVariants} \ 64 ${lib.optionalString (tweaks != []) "--tweaks " + builtins.toString tweaks} \ 65 --dest $out/share/themes 66 67 mkdir -p $out/share/doc/${pname} 68 cp -a src/firefox $out/share/doc/${pname} 69 70 rm $out/share/themes/*/{AUTHORS,COPYING} 71 72 jdupes --quiet --link-soft --recurse $out/share 73 74 runHook postInstall 75 ''; 76 77 passthru.updateScript = gitUpdater { }; 78 79 meta = with lib; { 80 description = "Flat Design theme for GTK based desktop environments"; 81 homepage = "https://github.com/vinceliuice/Qogir-theme"; 82 license = licenses.gpl3Only; 83 platforms = platforms.unix; 84 maintainers = [ maintainers.romildo ]; 85 }; 86}