-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
44 lines (37 loc) · 1.15 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
{
description = "Tool zum Einreichen von Komplexprüfungen";
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
in
{
overlays.default = (_final: prev: {
inherit (self.packages.${prev.system}) kpp;
});
nixosModules.default = {
imports = [ ./module.nix ];
nixpkgs.overlays = [ self.overlays.default ];
};
packages = forAllSystems (system: rec {
default = kpp;
kpp = pkgs.${system}.stdenvNoCC.mkDerivation {
name = "kpp";
src = ./.;
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
mkdir -p $out
cp -r $src/data $out
cp -r $src/js $out
cp -r $src/lang $out
cp -r $src/php $out
cp $src/index.php $out
cp $src/style.css $out
cp $src/pico.min.css $out
cp $src/robots.txt $out
'';
};
});
};
}