Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

microserver: init at 0.1.8 #97748

Merged
merged 1 commit into from Sep 18, 2020
Merged

microserver: init at 0.1.8 #97748

merged 1 commit into from Sep 18, 2020

Conversation

@flosse
Copy link
Contributor

@flosse flosse commented Sep 11, 2020

Motivation for this change

I use this fast and tiny server during development.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@KAction
Copy link
Contributor

@KAction KAction commented Sep 12, 2020

Do not build for me:

hash mismatch in fixed-output derivation '/nix/store/vf6s0vfzybsdh5z5k82xsxdlcr11mg7w-microserver-0.1.8-vendor.tar.gz':
  wanted: sha256:0ldn7g154ncg0h10442p1kr4nmx63wbws74ywm6z64g8kvciv54m
  got:    sha256:1yn3xmmhpixiviayicl2szlzfjx5crffp3pq75d5nz6ky3miai9l
cannot build derivation '/nix/store/ca5z4birnh5jdjhl3hzc53qsrwzzhcmm-microserver-0.1.8.drv': 1 dependencies couldn't be built
error: build of '/nix/store/ca5z4birnh5jdjhl3hzc53qsrwzzhcmm-microserver-0.1.8.drv' failed
@flosse flosse force-pushed the flosse:microserver branch from 1f22867 to 7a4868f Sep 12, 2020
Markus Kohlhase
@flosse flosse force-pushed the flosse:microserver branch from 7a4868f to 4ed3c35 Sep 12, 2020
@flosse
Copy link
Contributor Author

@flosse flosse commented Sep 12, 2020

@KAction You're right. I'm sorry!

@KAction
Copy link
Contributor

@KAction KAction commented Sep 12, 2020

Looks fine to me now:

$ ./result/bin/microserver
MicroServer running on port 9090!
Serving .
Spa support: true. Root: index.html
A((File { resp: Response { status: 200, version: HTTP/1.1, headers: {"content-length": "0", "content-type": "text/html", "accept-ranges": "bytes", "las
t-modified": "Sat, 12 Sep 2020 18:24:28 GMT"}, body: Body(Streaming) }, path: ArcPath("./index.html") },))
$ curl -vk http://localhost:9090
*   Trying ::1:9090...
* connect to ::1 port 9090 failed: Connection refused
*   Trying 127.0.0.1:9090...
* Connected to localhost (127.0.0.1) port 9090 (#0)
> GET / HTTP/1.1
> Host: localhost:9090
> User-Agent: curl/7.71.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< content-length: 0
< date: Sat, 12 Sep 2020 18:24:11 GMT
<
* Connection #0 to host localhost left intact
[antix1](0) /home/kaction
$ curl -vk http://localhost:9090
*   Trying ::1:9090...
* connect to ::1 port 9090 failed: Connection refused
*   Trying 127.0.0.1:9090...
* Connected to localhost (127.0.0.1) port 9090 (#0)
> GET / HTTP/1.1
> Host: localhost:9090
> User-Agent: curl/7.71.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< content-length: 0
< content-type: text/html
< accept-ranges: bytes
< last-modified: Sat, 12 Sep 2020 18:24:28 GMT
< date: Sat, 12 Sep 2020 18:24:33 GMT
<
* Connection #0 to host localhost left intact
/nix/store/priy7pz2qrk1z645hgybgj24s1frvbas-microserver-0.1.8      35821656
Copy link
Member

@stigtsp stigtsp left a comment

LGTM

Basic of exexutable OK

@stigtsp stigtsp merged commit f6e7056 into NixOS:master Sep 18, 2020
19 checks passed
19 checks passed
tests tests
Details
action
Details
Evaluation Performance Report Evaluator Performance Report
Details
Wait for ofborg
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="4ed3c35"; rev="4ed3c35fd9c0a5290eab7c0f88b0123ea1b7cf2d"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="4ed3c35"; rev="4ed3c35fd9c0a5290eab7c0f88b0123ea1b7cf2d"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="4ed3c35"; rev="4ed3c35fd9c0a5290eab7c0f88b0123ea1b7cf2d"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="4ed3c35"; rev="4ed3c35fd9c0a5290eab7c0f88b0123ea1b7cf2d"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="4ed3c35"; rev="4ed3c35fd9c0a5290eab7c0f88b0123ea1b7cf2d"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="4ed3c35"; rev="4ed3c35fd9c0a5290eab7c0f88b0123ea1b7cf2d"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="4ed3c35"; rev="4ed3c35fd9c0a5290eab7c0f88b0123ea1b7cf2d"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
microserver, microserver.passthru.tests on aarch64-linux Success
Details
microserver, microserver.passthru.tests on x86_64-linux Success
Details
@tjmcewan
Copy link

@tjmcewan tjmcewan commented Oct 21, 2020

does not build for me. :(

macOS 10.15.7
nix 2.3.7

my default.nix file:

{ pkgs ? import <nixpkgs> { } }:

pkgs.mkShell { buildInputs = [ pkgs.microserver ]; }

output:

   Compiling tempfile v3.1.0
error: linking with `/nix/store/sw7b2gcklaj3iy5ikv7ag163bpry3ivb-clang-wrapper-7.1.0/bin/cc` failed: exit code: 1
  |
  = note: "/nix/store/sw7b2gcklaj3iy5ikv7ag163bpry3ivb-clang-wrapper-7.1.0/bin/cc" "-m64" "-L" "/nix/store/3rf1v07d5ikm14532qdwnrd34hnkqd7j-rustc-1.45.2/lib/rustlib/x86_64-apple-darwin/lib" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/build/mime_guess-2441a9ba05aecf8b/build_script_build-2441a9ba05aecf8b.build_script_build.1fverjuu-cgu.0.rcgu.o" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/build/mime_guess-2441a9ba05aecf8b/build_script_build-2441a9ba05aecf8b.build_script_build.1fverjuu-cgu.1.rcgu.o" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/build/mime_guess-2441a9ba05aecf8b/build_script_build-2441a9ba05aecf8b.build_script_build.1fverjuu-cgu.10.rcgu.o" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/build/mime_guess-2441a9ba05aecf8b/build_script_build-2441a9ba05aecf8b.build_script_build.1fverjuu-cgu.11.rcgu.o" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/build/mime_guess-2441a9ba05aecf8b/build_script_build-2441a9ba05aecf8b.build_script_build.1fverjuu-cgu.12.rcgu.o" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/build/mime_guess-2441a9ba05aecf8b/build_script_build-2441a9ba05aecf8b.build_script_build.1fverjuu-cgu.13.rcgu.o" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/build/mime_guess-2441a9ba05aecf8b/build_script_build-2441a9ba05aecf8b.build_script_build.1fverjuu-cgu.14.rcgu.o" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/build/mime_guess-2441a9ba05aecf8b/build_script_build-2441a9ba05aecf8b.build_script_build.1fverjuu-cgu.15.rcgu.o" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/build/mime_guess-2441a9ba05aecf8b/build_script_build-2441a9ba05aecf8b.build_script_build.1fverjuu-cgu.2.rcgu.o" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/build/mime_guess-2441a9ba05aecf8b/build_script_build-2441a9ba05aecf8b.build_script_build.1fverjuu-cgu.3.rcgu.o" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/build/mime_guess-2441a9ba05aecf8b/build_script_build-2441a9ba05aecf8b.build_script_build.1fverjuu-cgu.4.rcgu.o" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/build/mime_guess-2441a9ba05aecf8b/build_script_build-2441a9ba05aecf8b.build_script_build.1fverjuu-cgu.5.rcgu.o" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/build/mime_guess-2441a9ba05aecf8b/build_script_build-2441a9ba05aecf8b.build_script_build.1fverjuu-cgu.6.rcgu.o" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/build/mime_guess-2441a9ba05aecf8b/build_script_build-2441a9ba05aecf8b.build_script_build.1fverjuu-cgu.7.rcgu.o" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/build/mime_guess-2441a9ba05aecf8b/build_script_build-2441a9ba05aecf8b.build_script_build.1fverjuu-cgu.8.rcgu.o" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/build/mime_guess-2441a9ba05aecf8b/build_script_build-2441a9ba05aecf8b.build_script_build.1fverjuu-cgu.9.rcgu.o" "-o" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/build/mime_guess-2441a9ba05aecf8b/build_script_build-2441a9ba05aecf8b" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/build/mime_guess-2441a9ba05aecf8b/build_script_build-2441a9ba05aecf8b.1ip2hky8bm5fz0lz.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/deps" "-L" "/nix/store/3rf1v07d5ikm14532qdwnrd34hnkqd7j-rustc-1.45.2/lib/rustlib/x86_64-apple-darwin/lib" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/deps/libphf_codegen-cc10978227834775.rlib" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/deps/libphf_generator-d19ba0836a99459e.rlib" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/deps/librand-c80278d89532d456.rlib" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/deps/librand_xorshift-a9e490ec3e54a30e.rlib" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/deps/librand_pcg-d374910d8ec9fe0d.rlib" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/deps/librand_hc-e7e7024367e450b1.rlib" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/deps/librand_chacha-0e0583ca9ec60169.rlib" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/deps/librand_isaac-c4fe828ee4c345ea.rlib" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/deps/librand_core-3dcf0e027f6ce744.rlib" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/deps/librand_os-9240339bdf4485ee.rlib" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/deps/librand_jitter-0f79a6f6ffdb4a4f.rlib" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/deps/liblibc-07960e5d6c915b82.rlib" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/deps/librand_core-eb1af1b55a172a20.rlib" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/deps/libphf_shared-6e4f8b4b399de620.rlib" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/deps/libunicase-ba4907bed8a636d3.rlib" "/private/var/folders/st/n_jym15x12jc_3pqkqb4t1_40000gn/T/nix-build-microserver-0.1.8.drv-0/source/target/release/deps/libsiphasher-8491031c776c5936.rlib" "/nix/store/3rf1v07d5ikm14532qdwnrd34hnkqd7j-rustc-1.45.2/lib/rustlib/x86_64-apple-darwin/lib/libstd-f900c16b5f7ca499.rlib" "/nix/store/3rf1v07d5ikm14532qdwnrd34hnkqd7j-rustc-1.45.2/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-a7261fee2449241a.rlib" "/nix/store/3rf1v07d5ikm14532qdwnrd34hnkqd7j-rustc-1.45.2/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-a6401e0a1e6e3dff.rlib" "/nix/store/3rf1v07d5ikm14532qdwnrd34hnkqd7j-rustc-1.45.2/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-729ff2cbee9bdc23.rlib" "/nix/store/3rf1v07d5ikm14532qdwnrd34hnkqd7j-rustc-1.45.2/lib/rustlib/x86_64-apple-darwin/lib/libbacktrace-594b043cb032b706.rlib" "/nix/store/3rf1v07d5ikm14532qdwnrd34hnkqd7j-rustc-1.45.2/lib/rustlib/x86_64-apple-darwin/lib/libbacktrace_sys-ad779468bf515a8f.rlib" "/nix/store/3rf1v07d5ikm14532qdwnrd34hnkqd7j-rustc-1.45.2/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-de8e9d4775e49d47.rlib" "/nix/store/3rf1v07d5ikm14532qdwnrd34hnkqd7j-rustc-1.45.2/lib/rustlib/x86_64-apple-darwin/lib/libunwind-caa8900842181a36.rlib" "/nix/store/3rf1v07d5ikm14532qdwnrd34hnkqd7j-rustc-1.45.2/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-115396c89bf540a3.rlib" "/nix/store/3rf1v07d5ikm14532qdwnrd34hnkqd7j-rustc-1.45.2/lib/rustlib/x86_64-apple-darwin/lib/liblibc-3cd5113a65ba2e5e.rlib" "/nix/store/3rf1v07d5ikm14532qdwnrd34hnkqd7j-rustc-1.45.2/lib/rustlib/x86_64-apple-darwin/lib/liballoc-a9b05e1f781b45d0.rlib" "/nix/store/3rf1v07d5ikm14532qdwnrd34hnkqd7j-rustc-1.45.2/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-b883374262ffe063.rlib" "/nix/store/3rf1v07d5ikm14532qdwnrd34hnkqd7j-rustc-1.45.2/lib/rustlib/x86_64-apple-darwin/lib/libcore-5772b503d5985844.rlib" "/nix/store/3rf1v07d5ikm14532qdwnrd34hnkqd7j-rustc-1.45.2/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-ff0db0c073b4042c.rlib" "-framework" "Security" "-lSystem" "-lresolv" "-lc" "-lm"
  = note: ld: framework not found Security
          clang-7: error: linker command failed with exit code 1 (use -v to see invocation)


error: aborting due to previous error

error: could not compile `mime_guess`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
builder for '/nix/store/fskac1md3dcf9n1lr59hq4r3hlgvnq0v-microserver-0.1.8.drv' failed with exit code 101
error: build of '/nix/store/fskac1md3dcf9n1lr59hq4r3hlgvnq0v-microserver-0.1.8.drv' failed

please let me know if i'm doing something wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.