{ description = "github.com/mstone/depict"; inputs.crane.url = "github:ipetkov/crane"; inputs.crane.inputs.nixpkgs.follows = "nixpkgs"; inputs.deploy-rs.url = "github:serokell/deploy-rs"; inputs.deploy-rs.inputs.nixpkgs.follows = "nixpkgs"; inputs.deploy-rs.inputs.flake-utils.follows = "flake-utils"; inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.nixpkgs.url = "nixpkgs/nixpkgs-unstable"; inputs.nix-filter.url = "github:numtide/nix-filter"; inputs.rust-overlay.url = "github:oxalica/rust-overlay"; inputs.rust-overlay.inputs.flake-utils.follows = "flake-utils"; inputs.rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; inputs.nixbom.url = "github:mstone/nixbom"; inputs.nixbom.inputs.crane.follows = "crane"; inputs.nixbom.inputs.flake-utils.follows = "flake-utils"; inputs.nixbom.inputs.nixpkgs.follows = "nixpkgs"; inputs.nixbom.inputs.nix-filter.follows = "nix-filter"; inputs.nixbom.inputs.rust-overlay.follows = "rust-overlay"; inputs.cargo-include-licenses.url = "github:mstone/cargo-include-licenses"; inputs.cargo-include-licenses.inputs.crane.follows = "crane"; inputs.cargo-include-licenses.inputs.flake-utils.follows = "flake-utils"; inputs.cargo-include-licenses.inputs.nixpkgs.follows = "nixpkgs"; inputs.cargo-include-licenses.inputs.rust-overlay.follows = "rust-overlay"; outputs = {self, nixpkgs, crane, deploy-rs, nixbom, rust-overlay, flake-utils, nix-filter, cargo-include-licenses}: flake-utils.lib.simpleFlake { inherit self nixpkgs; name = "depict"; preOverlays = [ rust-overlay.overlays.default ]; overlay = final: prev: { depict = rec { depictVersion = "0.2"; depict = lib.depict { isShell = false; }; devShell = lib.depict { isShell = true; }; defaultPackage = depict; server = with final; with pkgs; let subpkg = "depict-server"; serverBin = (lib.depict { isShell = false; subpkg = subpkg; subdir = "server"; }); in stdenv.mkDerivation { pname = "${subpkg}"; version = depictVersion; buildInputs = [ makeWrapper ]; phases = [ "installPhase" ]; installPhase = '' mkdir -p $out/bin cp ${serverBin}/bin/${subpkg} $out/bin/${subpkg} wrapProgram $out/bin/${subpkg} \ --set WEBROOT ${web} ''; }; wasm = with final; with pkgs; (lib.depict { isShell = false; subpkg = "depict-web"; subdir = "web"; isWasm = true; }); web = with final; with pkgs; let subpkg = "depict-web"; webBin = (lib.depict { isShell = false; subpkg = subpkg; subdir = "web"; isWasm = true; }); indexHtml = writeText "index.html" ''