1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

use finalAttrs

This commit is contained in:
2025-12-25 09:06:37 +01:00
parent 7c9db88672
commit 6ac4d821b8
5 changed files with 55 additions and 67 deletions

View File

@@ -3,36 +3,33 @@
fetchFromGitHub, fetchFromGitHub,
lib, lib,
pandoc, pandoc,
}: let }:
owner = "kamalist"; stdenv.mkDerivation (finalAttrs: {
pname = "auc"; pname = "auc";
in version = "2019-04-02";
stdenv.mkDerivation {
inherit pname;
version = "2019-04-02";
src = fetchFromGitHub { src = fetchFromGitHub {
inherit owner; owner = "kamalist";
repo = "AUC"; repo = "AUC";
rev = "66d1cd57472442b4bf3c1ed12ca5cadd57d076b3"; rev = "66d1cd57472442b4bf3c1ed12ca5cadd57d076b3";
sha256 = "0gb4asmlfr19h42f3c5wg9c9i3014if3ymrqan6w9klgzgfyh2la"; sha256 = "0gb4asmlfr19h42f3c5wg9c9i3014if3ymrqan6w9klgzgfyh2la";
}; };
installPhase = '' installPhase = ''
mkdir -p $out/{bin,man/man1} mkdir -p $out/{bin,man/man1}
install auc $out/bin install auc $out/bin
${pandoc}/bin/pandoc -V title=${lib.escapeShellArg pname} -V section=1 $src/README.md -s -t man -o $out/man/man1/auc.1 ${pandoc}/bin/pandoc -V title=${lib.escapeShellArg finalAttrs.pname} -V section=1 $src/README.md -s -t man -o $out/man/man1/auc.1
'';
doCheck = true;
meta = with lib; {
description = "Command-line Roman calendar";
longDescription = ''
AUC (Ab Urbe condita) is a command-line Roman calendar tool. Currently it shows the specified date in the format of the Ancient Romans.
''; '';
license = licenses.mit;
doCheck = true; maintainers = [ maintainers.kmein ];
platforms = platforms.all;
meta = with lib; { };
description = "Command-line Roman calendar"; })
longDescription = ''
AUC (Ab Urbe condita) is a command-line Roman calendar tool. Currently it shows the specified date in the format of the Ancient Romans.
'';
license = licenses.mit;
maintainers = [maintainers.kmein];
platforms = platforms.all;
};
}

View File

@@ -12,19 +12,17 @@
util-linux, util-linux,
zbar, zbar,
}: }:
let stdenv.mkDerivation (finalAttrs: {
name = "hc-${finalAttrs.version}";
version = "1.0.0"; version = "1.0.0";
in
stdenv.mkDerivation {
name = "hc-${version}";
src = fetchgit { src = fetchgit {
url = "https://cgit.krebsco.de/hc"; url = "https://cgit.krebsco.de/hc";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${finalAttrs.version}";
sha256 = "09349gja22p0j3xs082kp0fnaaada14bafszn4r3q7rg1id2slfb"; sha256 = "09349gja22p0j3xs082kp0fnaaada14bafszn4r3q7rg1id2slfb";
}; };
nativeBuildInputs = [makeWrapper]; nativeBuildInputs = [ makeWrapper ];
buildPhase = null; buildPhase = null;
@@ -34,19 +32,21 @@ stdenv.mkDerivation {
cp $src/bin/hc $out/bin/hc cp $src/bin/hc $out/bin/hc
wrapProgram $out/bin/hc \ wrapProgram $out/bin/hc \
--prefix PATH : ${lib.makeBinPath [ --prefix PATH : ${
coreutils lib.makeBinPath [
findutils coreutils
gawk findutils
gnugrep gawk
qrencode gnugrep
texlive.combined.scheme-full qrencode
util-linux texlive.combined.scheme-full
zbar util-linux
]} zbar
]
}
''; '';
meta = { meta = {
inherit version; version = finalAttrs.version;
}; };
} })

View File

@@ -6,17 +6,14 @@
libogg, libogg,
fetchFromGitHub, fetchFromGitHub,
}: }:
let stdenv.mkDerivation (finalAttrs: {
version = "1.3.0";
in
stdenv.mkDerivation {
name = "opustags"; name = "opustags";
version = version; version = "1.3.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "fmang"; owner = "fmang";
repo = "opustags"; repo = "opustags";
rev = version; rev = finalAttrs.version;
sha256 = "09z0cdg20algaj2yyhfz3hxh1biwjjvzx1pc2vdc64n8lkswqsc1"; sha256 = "09z0cdg20algaj2yyhfz3hxh1biwjjvzx1pc2vdc64n8lkswqsc1";
}; };
@@ -35,4 +32,4 @@ stdenv.mkDerivation {
description = "Ogg Opus tags editor"; description = "Ogg Opus tags editor";
platforms = platforms.all; platforms = platforms.all;
}; };
} })

View File

@@ -6,14 +6,11 @@
regex, regex,
... ...
}: }:
let buildPythonPackage (finalAttrs: {
pname = "indic_transliteration"; pname = "indic_transliteration";
in
buildPythonPackage {
inherit pname;
version = "unstable-2020-12-15"; version = "unstable-2020-12-15";
src = fetchFromGitHub { src = fetchFromGitHub {
repo = pname; repo = finalAttrs.pname;
owner = "sanskrit-coders"; owner = "sanskrit-coders";
rev = "2ea25a03af15937916b6768835e056166986c567"; rev = "2ea25a03af15937916b6768835e056166986c567";
sha256 = "1pcf800hl0zkcffc47mkjq9mizsxdi0hwxlnij5bvbqdshd3w9ll"; sha256 = "1pcf800hl0zkcffc47mkjq9mizsxdi0hwxlnij5bvbqdshd3w9ll";
@@ -21,4 +18,4 @@ buildPythonPackage {
patches = [./regex-version.patch]; patches = [./regex-version.patch];
propagatedBuildInputs = [backports_functools_lru_cache selenium regex]; propagatedBuildInputs = [backports_functools_lru_cache selenium regex];
doCheck = false; doCheck = false;
} })

View File

@@ -6,17 +6,14 @@
taglib, taglib,
zlib, zlib,
}: }:
let stdenv.mkDerivation (finalAttrs: {
version = "1.0";
in
stdenv.mkDerivation {
pname = "stag"; pname = "stag";
version = version; version = "1.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "smabie"; owner = "smabie";
repo = "stag"; repo = "stag";
rev = "v${version}"; rev = "v${finalAttrs.version}";
hash = "sha256-IWb6ZbPlFfEvZogPh8nMqXatrg206BTV2DYg7BMm7R4="; hash = "sha256-IWb6ZbPlFfEvZogPh8nMqXatrg206BTV2DYg7BMm7R4=";
}; };
@@ -46,4 +43,4 @@ stdenv.mkDerivation {
maintainers = [ lib.maintainers.kmein ]; maintainers = [ lib.maintainers.kmein ];
platforms = lib.platforms.unix; platforms = lib.platforms.unix;
}; };
} })