nix package
This commit is contained in:
parent
5848867423
commit
763e753698
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
matabas-db/
|
matabas-db/
|
||||||
artifacts/
|
artifacts/
|
||||||
|
result
|
26
flake.nix
26
flake.nix
|
@ -9,17 +9,27 @@
|
||||||
outputs = { self, flake-utils, nixpkgs }:
|
outputs = { self, flake-utils, nixpkgs }:
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
let pkgs = nixpkgs.legacyPackages.${system};
|
let pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in rec {
|
buildInputs = [
|
||||||
packages = {
|
|
||||||
default = pkgs.hello;
|
|
||||||
};
|
|
||||||
devShells.default = pkgs.mkShell {
|
|
||||||
packages = [
|
|
||||||
packages.default
|
|
||||||
pkgs.postgresql_15_jit
|
pkgs.postgresql_15_jit
|
||||||
( pkgs.ghc.withPackages (ps: with ps; [ scotty postgresql-typed ]) )
|
( pkgs.ghc.withPackages (ps: with ps; [ scotty postgresql-typed ]) )
|
||||||
];
|
];
|
||||||
shellHook = builtins.readFile ./buildScripts/devShellHook.sh ;
|
in rec {
|
||||||
|
packages = {
|
||||||
|
matabas = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "matabas";
|
||||||
|
src = ./. ;
|
||||||
|
inherit buildInputs ;
|
||||||
|
buildPhase = builtins.readFile ./buildScripts/setupEnv.sh + ''
|
||||||
|
build
|
||||||
|
mkdir -p "$out/bin"
|
||||||
|
mv artifacts/Main "$out/bin/matabas"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
default = packages.matabas;
|
||||||
|
};
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
packages = buildInputs;
|
||||||
|
shellHook = builtins.readFile ./buildScripts/setupEnv.sh ;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
) // {
|
) // {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user