nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 7644beb716c017dcfae2a9db81de7ef3be0f6565
parent bfc4d2da4c56a1869d903d6ce62a4a64af9dadb3
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Fri,  3 Dec 2021 11:00:27 +0300

Add mage

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/suckless/mage/default.nix | 31+++++++++++++++++++++++++++++++
2 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -370,6 +370,7 @@ lib.makeScope newScope ( lacc = callPackage ./suckless/lacc { }; lel = callPackage ./suckless/lel { }; libst = callPackage ./suckless/libst { }; + mage = callPackage ./suckless/mage { }; nsxiv = callPackage ./suckless/nsxiv { }; pista = callPackage ./suckless/pista { }; saait = callPackage ./suckless/saait { }; diff --git a/pkgs/suckless/mage/default.nix b/pkgs/suckless/mage/default.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, fetchFromGitHub, fontconfig, imlib2, libXft, conf ? null }: + +stdenv.mkDerivation rec { + pname = "mage"; + version = "2021-12-03"; + + src = fetchFromGitHub { + owner = "explosion-mental"; + repo = pname; + rev = "5e9c6e0b0d576b70c5764e7b39201e972a2e4eba"; + hash = "sha256-k5LsO+kpK9lNIzNImNaTb6nr54Y5C3MfZy0oYjjgc6s="; + }; + + configFile = lib.optionalString (conf!=null) (builtins.toFile "config.h" conf); + preBuild = lib.optionalString (conf!=null) "cp ${configFile} config.h"; + + buildInputs = [ fontconfig imlib2 libXft ]; + + makeFlags = [ "CC:=$(CC)" ]; + + installFlags = [ "PREFIX=$(out)" ]; + + meta = with lib; { + description = "iMAGE viewer"; + inherit (src.meta) homepage; + license = licenses.gpl2Only; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.linux; + skip.ci = stdenv.isDarwin; + }; +}