diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..75e49aa --- /dev/null +++ b/flake.nix @@ -0,0 +1,43 @@ +{ + inputs = { + nixpkgs = { + type = "github"; + owner = "NixOS"; + repo = "nixpkgs"; + ref = "nixos-25.05"; + }; + }; + + outputs = { nixpkgs, ... }: + let supportedSystems = [ "aarch64-linux" "x86_64-linux" ]; + forAllSystems = nixpkgs.lib.genAttrs supportedSystems; + nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); + in { + packages = forAllSystems (system: let pkgs = nixpkgsFor.${system}; in { + default = pkgs.php.buildComposerProject2 rec { + pname = "mantis-smalltech"; + version = "1.0"; + + src = ./.; + vendorHash = "sha256-xSUFx75c7z6IVBqnwV/CqnzhHZfSXTxFyOLyemhPb8Y="; + + dontBuild = true; + + postInstall = '' + mv $out/share/php/mantis-smalltech $out/MantisSmalltech + rmdir $out/share/php + rmdir $out/share + ''; + }; + }); + + devShells = forAllSystems (system: let pkgs = nixpkgsFor.${system}; in { + default = pkgs.mkShell { + buildInputs = with pkgs; [ + php + phpPackages.composer + ]; + }; + }); + }; +} |