mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-12 15:37:47 +03:00
Merge pull request #330511 from zimbatm/nar-serve-package
nixos/nar-serve: 0.6.1 -> 0.7.0
This commit is contained in:
commit
6952047399
@ -12,6 +12,8 @@ in
|
||||
services.nar-serve = {
|
||||
enable = mkEnableOption "serving NAR file contents via HTTP";
|
||||
|
||||
package = mkPackageOption pkgs "nar-serve" { };
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 8383;
|
||||
@ -32,6 +34,17 @@ in
|
||||
- gs:// for binary caches stored in Google Cloud Storage
|
||||
'';
|
||||
};
|
||||
|
||||
domain = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
description = ''
|
||||
When set, enables the feature of serving <nar-hash>.<domain>
|
||||
on top of <domain>/nix/store/<nar-hash>-<pname>.
|
||||
|
||||
Useful to preview static websites where paths are absolute.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -47,7 +60,7 @@ in
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
RestartSec = "5s";
|
||||
ExecStart = "${pkgs.nar-serve}/bin/nar-serve";
|
||||
ExecStart = lib.getExe cfg.package;
|
||||
DynamicUser = true;
|
||||
};
|
||||
};
|
||||
|
@ -4,16 +4,16 @@
|
||||
}:
|
||||
buildGoModule rec {
|
||||
pname = "nar-serve";
|
||||
version = "0.6.1";
|
||||
version = "0.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "numtide";
|
||||
repo = "nar-serve";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-cSOYHYJJEGzFtkD4mjTmYBiM9CaWKt64xgV/JeNHpfM=";
|
||||
hash = "sha256-8QuMS00EutmqzAIPxyJEPxM8EHiWlSKs6E2Htoh3Kes=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-RpjLs4+9abbbysYAlPDUXBLe1cz4Lp+QmR1yv+LpYwQ=";
|
||||
vendorHash = "sha256-td9NYHGYJYPlIj2tnf5I/GnJQOOgODc6TakHFwxyvLQ=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user