nixpkgs/pkgs/by-name/nu/nuv/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

83 lines
1.4 KiB
Nix

{
lib,
symlinkJoin,
callPackage,
fetchFromGitHub,
buildGoModule,
makeWrapper,
jq,
curl,
kubectl,
eksctl,
kind,
k3sup,
coreutils,
}:
let
branch = "3.0.0";
version = "3.0.1-beta.2405292059";
pname = "nuv";
in
buildGoModule {
inherit pname version;
src = fetchFromGitHub {
owner = "nuvolaris";
repo = "nuv";
rev = version;
hash = "sha256-MdnBvlA4S2Mi/bcbE+O02x+wvlIrsK1Zc0dySz4FB/w=";
};
subPackages = [ "." ];
vendorHash = "sha256-JkQbQ2NEaumXbAfsv0fNiQf/EwMs3SDLHvu7c/bU7fU=";
nativeBuildInputs = [
makeWrapper
jq
curl
];
ldflags = [
"-s"
"-w"
"-X main.NuvVersion=${version}"
"-X main.NuvBranch=${branch}"
];
# false because tests require some modifications inside nix-env
doCheck = false;
postInstall =
let
nuv-bin = symlinkJoin {
name = "nuv-bin";
paths = [
coreutils
kubectl
eksctl
kind
k3sup
];
};
in
''
wrapProgram $out/bin/nuv --set NUV_BIN "${nuv-bin}/bin"
'';
passthru.tests = {
simple = callPackage ./tests.nix { inherit version; };
};
meta = {
homepage = "https://nuvolaris.io/";
description = "A CLI tool for running tasks using the Nuvolaris serverless engine";
license = lib.licenses.asl20;
mainProgram = "nuv";
maintainers = with lib.maintainers; [
msciabarra
d4rkstar
];
};
}