-
Notifications
You must be signed in to change notification settings - Fork 0
/
overlays.nix
42 lines (41 loc) · 923 Bytes
/
overlays.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
flatpak-builder-tools,
...
}:
let
flatpak-cargo-generator =
pkgs:
with pkgs;
let
python = python3.withPackages (
p: with p; [
aiohttp
toml
]
);
in
stdenv.mkDerivation rec {
name = "flatpak-cargo-generator";
src = "${flatpak-builder-tools}/cargo/flatpak-cargo-generator.py";
dontUnpack = true;
dontBuild = true;
nativeBuildInputs = [ python ];
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/${name}
patchShebangs --build $out/bin/${name}
chmod a+x $out/bin/${name}
runHook postInstall
'';
};
in
[
(final: prev: {
mpv =
if final.stdenv.hostPlatform.isLinux then
prev.mpv.override { scripts = [ final.mpvScripts.mpris ]; }
else
prev.mpv;
})
(final: prev: { flatpak-cargo-generator = flatpak-cargo-generator final; })
]