-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
45 lines (34 loc) · 1.1 KB
/
flake.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
43
44
45
# This file allows building and running the software with the Nix package
# manager, used in NixOS or on another distribution.
{
description = "a Quake3/XreaL/Daemon shader files generator from directories of texture maps";
inputs = {
nixpkgs.url = "flake:nixpkgs";
};
outputs = { self, nixpkgs }:
let
lib = nixpkgs.legacyPackages.x86_64-linux.lib;
in {
defaultPackage = lib.mapAttrs (system: pkgs:
pkgs.python3.pkgs.buildPythonPackage {
name = "sloth";
src = pkgs.lib.cleanSource ./.;
format = "other";
buildInputs = [
(pkgs.python3.withPackages (ps: [ ps.pillow ]))
];
installPhase = ''
runHook preInstall
install -Dm0755 sloth.py $out/bin/sloth;
runHook postInstall
'';
meta.license = pkgs.lib.licenses.gpl3Plus;
}
) nixpkgs.legacyPackages;
defaultApp = lib.mapAttrs (system: pkgs:
{ type = "app";
program = "${self.defaultPackage."${system}"}/bin/sloth";
}
) nixpkgs.legacyPackages;
};
}