default.nix (954B)
1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fontconfig, 6 imlib2, 7 libXft, 8 conf ? null, 9 }: 10 11 stdenv.mkDerivation (finalAttrs: { 12 pname = "mage"; 13 version = "0.8-unstable-2022-12-30"; 14 15 src = fetchFromGitHub { 16 owner = "explosion-mental"; 17 repo = "mage"; 18 rev = "15ce5485379cc4d3d1bfdec49beccaffd9fb6c30"; 19 hash = "sha256-v119RZAygmcdKnu6GpDvdw+yW2jiDQ7WyjLC2vQVXyw="; 20 }; 21 22 configFile = lib.optionalString (conf != null) (builtins.toFile "config.h" conf); 23 preBuild = lib.optionalString (conf != null) "cp ${finalAttrs.configFile} config.h"; 24 25 buildInputs = [ 26 fontconfig 27 imlib2 28 libXft 29 ]; 30 31 makeFlags = [ "CC:=$(CC)" ]; 32 33 installFlags = [ "PREFIX=$(out)" ]; 34 35 meta = { 36 description = "iMAGE viewer"; 37 homepage = "https://github.com/explosion-mental/mage"; 38 license = lib.licenses.gpl2Only; 39 maintainers = [ lib.maintainers.sikmir ]; 40 platforms = lib.platforms.linux; 41 skip.ci = stdenv.isDarwin; 42 }; 43 })