nettsiden/flake.nix

38 lines
1009 B
Nix
Raw Normal View History

{
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"
];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: let
2024-03-05 14:38:07 +01:00
pkgs = nixpkgs.legacyPackages.${system};
in f system pkgs);
in {
packages = forAllSystems (system: pkgs: {
2024-03-05 14:38:07 +01:00
default = self.packages.${system}.pvv-nettsiden;
pvv-nettsiden = pkgs.callPackage ./nix/package.nix { php = pkgs.php82; };
2024-03-05 14:38:07 +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; };
};
};
nixosModules.default = nix/module.nix;
devShells = forAllSystems (system: pkgs: {
default = pkgs.callPackage ./nix/shell.nix { inherit pkgs; };
});
};
}