vidzig/flake.nix
LordMZTE a55235ba48
Some checks failed
/ test (push) Successful in 4m31s
/ push-nix (push) Failing after 5m54s
chore: update to Zig 0.13.0
2024-06-21 19:34:16 +02:00

53 lines
1.3 KiB
Nix

{
description = "Video download server in Zig.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs =
{ self
, nixpkgs
, utils
,
}: utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs { inherit system; };
in
{
packages.default = pkgs.stdenv.mkDerivation {
name = "vidzig";
src = ./.;
dontConfigure = true;
dontFixup = true;
nativeBuildInputs = with pkgs; [ zig_0_13.hook haxe ];
postPatch = ''
runHook prePostPatch
mkdir -p $ZIG_GLOBAL_CACHE_DIR
ln -s ${pkgs.callPackage ./deps.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
runHook postPostPatch
'';
};
devShells.default = nixpkgs.legacyPackages.${system}.mkShell {
buildInputs = with pkgs; [
zig
haxe
];
shellHook = ''
echo Welcome to the Vidzig dev shell!
echo build with \'zig build\'
echo run the server with \'zig run-server\'
echo run vzctl with \'zig run-cli\'
'';
};
}) //
{
nixosModules.default = import ./nixos/vidzig.nix self;
};
}