mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-19 22:30:23 +00:00
yopass: init at 14.9.0 (#551500)
This commit is contained in:
57
pkgs/by-name/yo/yopass/package.nix
Normal file
57
pkgs/by-name/yo/yopass/package.nix
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
buildGoModule,
|
||||
callPackage,
|
||||
fetchFromGitHub,
|
||||
makeBinaryWrapper,
|
||||
lib,
|
||||
}:
|
||||
let
|
||||
version = "14.9.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "jhaals";
|
||||
repo = "yopass";
|
||||
tag = version;
|
||||
hash = "sha256-YZeSGcQcAsOmIwhhVpGN7bxlNGsWIJNAwUBxJM/7314=";
|
||||
};
|
||||
|
||||
website = callPackage ./website.nix { inherit src version; };
|
||||
in
|
||||
buildGoModule (finalAttrs: {
|
||||
inherit version src;
|
||||
pname = "yopass";
|
||||
|
||||
__structuredAttrs = true;
|
||||
strictDeps = true;
|
||||
|
||||
vendorHash = "sha256-mR17QPGZNJ9Vx6y6mExvZDKReVxdUif8aQ6VMfKVgcM=";
|
||||
|
||||
nativeBuildInputs = [ makeBinaryWrapper ];
|
||||
|
||||
subPackages = [
|
||||
"cmd/yopass"
|
||||
"cmd/yopass-server"
|
||||
];
|
||||
|
||||
checkFlags = [
|
||||
# Disable tests that require network access
|
||||
"-skip=TestSecretNotFoundError"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/yopass-server \
|
||||
--add-flags "--asset-path ${website}"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Secure sharing of secrets, passwords and files";
|
||||
homepage = "https://github.com/jhaals/yopass";
|
||||
changelog = "https://github.com/jhaals/yopass/releases/tag/${finalAttrs.src.tag}";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [
|
||||
ivarmedi
|
||||
fraggerfox
|
||||
];
|
||||
mainProgram = "yopass";
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
35
pkgs/by-name/yo/yopass/website.nix
Normal file
35
pkgs/by-name/yo/yopass/website.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
fetchYarnDeps,
|
||||
nodejs-slim,
|
||||
src,
|
||||
stdenv,
|
||||
version,
|
||||
yarnBuildHook,
|
||||
yarnConfigHook,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "yopass-website";
|
||||
inherit version;
|
||||
|
||||
src = src + "/website";
|
||||
|
||||
yarnOfflineCache = fetchYarnDeps {
|
||||
yarnLock = "${finalAttrs.src}/yarn.lock";
|
||||
hash = "sha256-x3ouozoDreaeeqoh8osXOqEYphy6vTalLMjQt5vowkg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
yarnConfigHook
|
||||
yarnBuildHook
|
||||
nodejs-slim
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mv dist $out
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
})
|
||||
Reference in New Issue
Block a user