build: Added thor as a nix package.

This commit is contained in:
Spencer Brower
2026-07-10 16:33:11 -04:00
parent 5adcdf12c1
commit 454f90f5cb
4 changed files with 49 additions and 25 deletions
+38 -9
View File
@@ -6,7 +6,7 @@
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
# process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
treefmt-nix.url = "github:numtide/treefmt-nix";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
};
@@ -16,7 +16,7 @@
, flake-parts
, nixpkgs
, nixpkgs-unstable
, process-compose-flake
# , process-compose-flake
, treefmt-nix
}:
flake-parts.lib.mkFlake { inherit inputs; } {
@@ -66,14 +66,43 @@
};
};
/*
process-compose.default.settings.processes = {
web.command = "sudo ${pkgs.caddy}/bin/caddy run";
mail.command = "${pkgs.mailhog}/bin/MailHog";
php.command = "${php}/bin/php-fpm -F -y php-fpm.conf";
redis.command = "${$pks.redis}/bin/redis-server";
#process-compose.default.settings.processes = { };
packages.default = pkgs.stdenv.mkDerivation rec {
pname = "thor";
version = nixpkgs.lib.trim (builtins.readFile ./version.txt);
src = ./.;
nativeBuildInputs = [
pkgs.odin
pkgs.pkg-config
];
buildInputs = [
pkgs.git
];
doCheck = true;
checkPhase = ''
runHook preCheck
odin test . -all-packages
runHook postCheck
'';
buildPhase = ''
runHook preBuild
odin build . -o:speed -out:${pname}-keep
echo "Listing filles..."
ls .
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 ${pname}-keep $out/bin/${pname}
runHook postInstall
'';
};
*/
devShells.default = pkgs.mkShell
{