storj: create package
This commit is contained in:
parent
b1a0071c40
commit
730a95369a
10
flake.nix
10
flake.nix
@ -21,6 +21,11 @@
|
||||
let
|
||||
fqdns = builtins.attrNames (builtins.readDir ./hosts);
|
||||
isNixos = fqdn: !builtins.pathExists ./hosts/${fqdn}/darwin;
|
||||
getSystemOverlays = system: nixpkgsConfig: [
|
||||
(final: prev: {
|
||||
"storj" = final.callPackage ./pkgs/storj.nix { };
|
||||
})
|
||||
];
|
||||
mkHost = fqdn:
|
||||
let system = builtins.readFile ./hosts/${fqdn}/system;
|
||||
in
|
||||
@ -32,9 +37,10 @@
|
||||
./modules/default.nix
|
||||
agenix.nixosModules.default
|
||||
home-manager.nixosModules.default
|
||||
{
|
||||
({ config, ... }: {
|
||||
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
||||
}
|
||||
nixpkgs.overlays = getSystemOverlays config.nixpkgs.hostPlatform.system config.nixpkgs.config;
|
||||
})
|
||||
];
|
||||
};
|
||||
in
|
||||
|
32
pkgs/storj.nix
Normal file
32
pkgs/storj.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{ stdenv, lib, fetchFromGitHub, buildGoModule, ... }:
|
||||
|
||||
let
|
||||
version = "1.80.9";
|
||||
src = fetchFromGitHub {
|
||||
owner = "storj";
|
||||
repo = "storj";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-2YeBAwBpoMBRmIpNo7Vh81rtBKxJHyz817Fq0jsf1yc=";
|
||||
};
|
||||
meta = with lib; {
|
||||
description = "Storj is building a distributed cloud storage network.";
|
||||
homepage = "https://github.com/storj/storj";
|
||||
license = licenses.agpl3Only;
|
||||
maintainers = [{
|
||||
email = "jake@hillion.co.uk";
|
||||
matrix = "@jake:hillion.co.uk";
|
||||
name = "Jake Hillion";
|
||||
github = "JakeHillion";
|
||||
githubId = 5712856;
|
||||
}];
|
||||
};
|
||||
in
|
||||
buildGoModule rec {
|
||||
pname = "storagenode";
|
||||
inherit version src meta;
|
||||
vendorHash = "sha256-Sz/aM1mYpYnnVc6PTfldaiHQPT8TZCPfB6vQpzM2GDo=";
|
||||
subPackages = [
|
||||
"cmd/storagenode"
|
||||
"cmd/identity"
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue
Block a user