{ 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; }; }