2024-05-08 21:05:14 +02:00
|
|
|
{ common, lib, pkgs, config, ... }:
|
2024-04-25 00:31:45 +02:00
|
|
|
let
|
|
|
|
flakePkg = ref: (builtins.getFlake ref).packages.${pkgs.system}.default;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.mzte-nix-packages = lib.mkOption { };
|
|
|
|
|
2024-05-09 08:28:26 +02:00
|
|
|
config.nixpkgs.overlays = [
|
|
|
|
(final: prev: {
|
|
|
|
nsxiv = prev.nsxiv.overrideAttrs {
|
|
|
|
patches = [ (common.confgenFile "cgassets/nix/nsxiv-config.patch") ];
|
|
|
|
};
|
|
|
|
nsxiv-pipe = prev.stdenvNoCC.mkDerivation {
|
|
|
|
name = "nsxiv-pipe";
|
|
|
|
src = prev.fetchurl {
|
2024-07-16 23:00:14 +02:00
|
|
|
url = "https://codeberg.org/nsxiv/nsxiv-extra/raw/commit/f7d1efe3495949e2e88fdfef37aed5a40400acea/scripts/nsxiv-pipe/nsxiv-pipe";
|
|
|
|
sha256 = "sha256-q651YZlot/lEKyIqVBvvXWUTsdpUbIvg9BGH0dZ77u8=";
|
2024-05-09 08:28:26 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
dontBuild = true;
|
|
|
|
dontFixup = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
|
|
substitute $src $out/bin/nsxiv-pipe \
|
|
|
|
--replace "nsxiv " "${final.nsxiv}/bin/nsxiv "
|
|
|
|
chmod +x $out/bin/nsxiv-pipe
|
|
|
|
patchShebangs $out/bin/nsxiv-pipe
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
};
|
2024-05-08 21:05:14 +02:00
|
|
|
})
|
2024-05-09 08:28:26 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
config.mzte-nix-packages = with pkgs; [
|
2024-05-24 12:05:20 +02:00
|
|
|
comma
|
2024-05-09 08:28:26 +02:00
|
|
|
nix-du
|
2024-05-21 23:14:18 +02:00
|
|
|
nix-output-monitor
|
2024-05-09 08:28:26 +02:00
|
|
|
nsxiv
|
|
|
|
nsxiv-pipe
|
2024-05-21 23:14:18 +02:00
|
|
|
nurl
|
2024-04-25 00:31:45 +02:00
|
|
|
(flakePkg "github:nix-community/zon2nix")
|
2024-05-24 12:05:20 +02:00
|
|
|
(flakePkg "github:zhaofengli/attic")
|
2024-04-25 00:31:45 +02:00
|
|
|
];
|
|
|
|
|
2024-06-17 21:17:17 +02:00
|
|
|
config.output.packages.mzte-nix = pkgs.symlinkJoin {
|
2024-04-25 00:31:45 +02:00
|
|
|
name = "mzte-nix";
|
2024-05-10 22:53:13 +02:00
|
|
|
paths = lib.concatMap (p: map (o: p.${o}) p.outputs) config.mzte-nix-packages;
|
2024-04-25 00:31:45 +02:00
|
|
|
};
|
|
|
|
}
|