diff --git a/flake.nix b/flake.nix index 652eab70c5..471644b037 100644 --- a/flake.nix +++ b/flake.nix @@ -38,7 +38,12 @@ let overlays = [ (import rust-overlay) ] - ++ (if system == "x86_64-linux" then [ nixgl.overlay ] else [ ]); + ++ (if system == "x86_64-linux" then [ nixgl.overlay ] else [ ]) + ++ [(final: prev: { + # using a custom simple-http-server fork because of github.com/TheWaWaR/simple-http-server/issues/111 + # the server is used for local testing of the roc website + simple-http-server = final.callPackage ./nix/simple-http-server.nix { }; + })]; pkgs = import nixpkgs { inherit system overlays; }; rocBuild = import ./nix { inherit pkgs; }; @@ -105,7 +110,6 @@ libiconv # for examples/gui libxkbcommon # for examples/gui cargo-criterion # for benchmarks - simple-http-server # to view roc website when trying out edits wasm-pack # for repl_wasm jq # used in several bash scripts cargo-nextest # used to give more info for segfaults for gen tests diff --git a/nix/simple-http-server.nix b/nix/simple-http-server.nix new file mode 100644 index 0000000000..c04e26e5fd --- /dev/null +++ b/nix/simple-http-server.nix @@ -0,0 +1,16 @@ +{ rustPlatform, fetchFromGitHub }: + +rustPlatform.buildRustPackage { + pname = "simple-http-server"; + version = "0.1.0"; # adjust version as needed + + src = fetchFromGitHub { + owner = "Anton-4"; + repo = "simple-http-server"; + rev = "f3089e5736a1e8abdb69ba9e7618fe5e518a2df0"; + }; + + cargoLock = { + lockFile = "${src}/Cargo.lock"; + }; +}