2023-09-02 19:55:24 +02:00
|
|
|
{
|
|
|
|
description = "Programvareverkstedet/nettsiden PHP environment";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs }:
|
|
|
|
let
|
|
|
|
systems = [
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
|
|
|
"aarch64-darwin"
|
|
|
|
];
|
2024-03-23 21:03:21 +01:00
|
|
|
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: let
|
2024-03-05 14:38:07 +01:00
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
2024-03-23 21:03:21 +01:00
|
|
|
in f system pkgs);
|
|
|
|
in {
|
|
|
|
packages = forAllSystems (system: pkgs: {
|
2024-03-05 14:38:07 +01:00
|
|
|
default = self.packages.${system}.pvv-nettsiden;
|
2024-03-23 21:03:21 +01:00
|
|
|
pvv-nettsiden = pkgs.callPackage ./nix/package.nix { php = pkgs.php82; };
|
2024-03-05 14:38:07 +01:00
|
|
|
});
|
2023-09-02 19:55:24 +02:00
|
|
|
|
2024-03-23 21:03:21 +01:00
|
|
|
overlays.default = final: prev: {
|
|
|
|
inherit (self.packages.${final.system}) pvv-nettsiden;
|
|
|
|
formats = prev.formats // {
|
|
|
|
php = import ./nix/php-generator.nix { pkgs = prev; lib = prev.lib; };
|
|
|
|
};
|
|
|
|
};
|
2023-09-02 19:55:24 +02:00
|
|
|
|
2024-03-23 21:03:21 +01:00
|
|
|
nixosModules.default = nix/module.nix;
|
2023-09-02 19:55:24 +02:00
|
|
|
|
2024-03-23 21:03:21 +01:00
|
|
|
devShells = forAllSystems (system: pkgs: {
|
|
|
|
default = pkgs.callPackage ./nix/shell.nix { inherit pkgs; };
|
2023-09-02 19:55:24 +02:00
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|