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

feat: remove nur-packages

This commit is contained in:
2021-12-22 22:55:43 +01:00
parent f02225d1e9
commit 33b960143b
16 changed files with 315 additions and 4 deletions

27
packages/daybook.nix Normal file
View File

@@ -0,0 +1,27 @@
{ lib, stdenv, makeWrapper, pandoc, fetchFromGitHub }:
stdenv.mkDerivation {
name = "daybook";
src = fetchFromGitHub {
owner = "kmein";
repo = "daybook";
rev = "db2c34830e09183c80f3381bf5e4c44d52f05d53";
sha256 = "0nbsv8f12qh5spq7zhimhdf3p7msk33xrb0ilqvlc6jmlkpislmv";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ pandoc ];
buildPhase = ''
mkdir -p $out/man/man1
pandoc --standalone --to man daybook.1.md -o $out/man/man1/daybook.1
'';
installPhase = ''
mkdir -p $out/bin
install daybook $out/bin
wrapProgram $out/bin/daybook --prefix PATH ":" ${pandoc}/bin ;
'';
meta = with lib; {
homepage = https://github.com/kmein/daybook;
description = "A diary writing utility in sh";
license = licenses.mit;
platforms = platforms.linux;
};
}

29
packages/depp.nix Normal file
View File

@@ -0,0 +1,29 @@
{ lib, writeShellScriptBin }:
let
aliasFlag = name: value: "-c alias.${name}=${lib.escapeShellArg value}";
aliases = {
eroeffne = "init";
machnach = "clone";
zieh = "pull";
fueghinzu = "add";
drueck = "push";
pfusch = "push --force";
zweig = "branch";
verzweige = "branch";
uebergib = "commit";
erde = "rebase";
unterscheide = "diff";
vereinige = "merge";
bunkere = "stash";
markiere = "tag";
nimm = "checkout";
tagebuch = "log";
zustand = "status";
};
in writeShellScriptBin "depp" ''
if [ $# -gt 0 ]; then
git ${lib.concatStringsSep " " (lib.attrsets.mapAttrsToList aliasFlag aliases)} "$@"
else
printf "${lib.concatStringsSep "\n" (lib.attrsets.mapAttrsToList (n: v: n + " " + v) aliases)}\n"
fi
''

28
packages/devour.nix Normal file
View File

@@ -0,0 +1,28 @@
{ lib, stdenv, xdo, makeWrapper, fetchFromGitHub }:
stdenv.mkDerivation {
name = "devour";
version = "master";
src = fetchFromGitHub {
owner = "salman-abedin";
repo = "devour";
rev = "ceb871c3046ce290c27e2887365b9a19ca38113c";
sha256 = "0f2jb8knx7lqy6wmf3rchgq2n2dj496lm8vgcs58rppzrmsk59d5";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ xdo ];
DESTDIR="$(out)";
fixupPhase = ''
wrapProgram $out/bin/devour --prefix PATH ":" ${xdo}/bin ;
'';
meta = with lib; {
homepage = "https://github.com/salman-abedin/devour";
description = "Window Manager agnostic swallowing feature for terminal emulators";
license = licenses.gpl3;
platforms = platforms.all;
};
}

30
packages/mahlzeit.nix Normal file
View File

@@ -0,0 +1,30 @@
{ lib, fetchFromGitHub, mkDerivation, ansi-terminal, base, directory, doctest, filepath
, megaparsec, optparse-applicative, prettyprinter, process
, raw-strings-qq, stdenv, tasty, tasty-hunit, text, yaml
}:
mkDerivation {
pname = "mahlzeit";
version = "0.1.0";
src = fetchFromGitHub {
owner = "kmein";
repo = "mahlzeit";
rev = "954c0fb3f45815999bc65d003794af6a850b069c";
sha256 = "046yrr40hjmxkjmwzcvmwb39fxx2v2i6hgdxrjfiwilzvhikarrg";
};
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
ansi-terminal base directory filepath megaparsec prettyprinter text
yaml
];
executableHaskellDepends = [
ansi-terminal base directory filepath optparse-applicative process
text yaml
];
testHaskellDepends = [
base doctest megaparsec raw-strings-qq tasty tasty-hunit
];
homepage = "https://github.com/kmein/mahlzeit";
description = "Recipe toolkit";
license = lib.licenses.mit;
}

26
packages/opustags.nix Normal file
View File

@@ -0,0 +1,26 @@
{ lib, stdenv, cmake, pkgconfig, libogg, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "opustags";
version = "1.3.0";
src = fetchFromGitHub {
owner = "fmang";
repo = "opustags";
rev = version;
sha256 = "09z0cdg20algaj2yyhfz3hxh1biwjjvzx1pc2vdc64n8lkswqsc1";
};
cmakeFlags = [
"-DCMAKE_INSTALL_PREFIX=$out"
];
buildInputs = [ libogg ];
nativeBuildInputs = [ cmake pkgconfig ];
meta = with lib; {
homepage = "https://github.com/fmang/opustags";
description = "Ogg Opus tags editor";
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,12 @@
{ fetchPypi, buildPythonPackage, pygtrie, ... }:
buildPythonPackage rec {
pname = "betacode";
version = "0.2";
src = fetchPypi {
inherit pname version;
sha256 = "08fnjzjvnm9m6p4ddyr8qgfb9bs2nipv4ls50784v0xazgxx7siv";
};
preBuild = ''echo > README.rst'';
propagatedBuildInputs = [ pygtrie ];
doCheck = false;
}

View File

@@ -0,0 +1,14 @@
{ fetchFromGitHub, buildPythonPackage, backports_functools_lru_cache, selenium, regex, ... }:
buildPythonPackage rec {
pname = "indic_transliteration";
version = "unstable-2020-12-15";
src = fetchFromGitHub {
repo = pname;
owner = "sanskrit-coders";
rev = "2ea25a03af15937916b6768835e056166986c567";
sha256 = "1pcf800hl0zkcffc47mkjq9mizsxdi0hwxlnij5bvbqdshd3w9ll";
};
patches = [ ./regex-version.patch ];
propagatedBuildInputs = [ backports_functools_lru_cache selenium regex ];
doCheck = false;
}

View File

@@ -0,0 +1,9 @@
diff --git a/requirements.txt b/requirements.txt
index 76b12d7..27fdc79 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,3 @@
backports.functools_lru_cache==1.6.1
selenium==3.141.0
-regex==2020.10.11
+regex>=2020.7.14

View File

@@ -0,0 +1,12 @@
{ buildPythonApplication, fetchPypi, requests }:
let
in buildPythonApplication rec {
pname = "instaloader";
version = "4.2.4";
src = fetchPypi {
inherit pname version;
sha256 = "02zqb02idk2pzks7dv42vigcmmpjpfhfdyjp911yr0ix7dy3q0b9";
};
propagatedBuildInputs = [ requests ];
doCheck = false;
}

View File

@@ -0,0 +1,10 @@
{ fetchPypi, buildPythonPackage, ... }:
buildPythonPackage rec {
pname = "pygtrie";
version = "2.3";
src = fetchPypi {
inherit pname version;
sha256 = "00x7q4p9r75zdnw3a8vd0d0w0i5l28w408g5bsfl787yv6b1h9i8";
};
doCheck = false;
}

View File

@@ -0,0 +1,23 @@
{ buildPythonPackage, buildPythonApplication, fetchPypi, pytestrunner, six, beautifulsoup4, requests, dbus-python }:
let
lyricwikia = buildPythonPackage rec {
pname = "lyricwikia";
version = "0.1.9";
src = fetchPypi {
inherit pname version;
sha256 = "0sa5wkbgp5bpgkl8hgn7byyz9zj0786647ikf2l0k8m4fimq623y";
};
buildInputs = [ pytestrunner ];
propagatedBuildInputs = [ six beautifulsoup4 requests ];
doCheck = false;
};
in buildPythonApplication rec {
pname = "spotify-cli-linux";
version = "1.4.2";
src = fetchPypi {
inherit pname version;
sha256 = "1gxich3v2i4lmh60abbw3mw15399afvvqflv8g6plvvbmvxmbgp0";
};
propagatedBuildInputs = [ lyricwikia dbus-python ];
doCheck = false;
}

View File

@@ -1,7 +1,8 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
let let
nur = import <niveum/submodules/nur-packages> {};
kpaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/kpaste> { }; kpaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/kpaste> { };
opustags = pkgs.callPackage <niveum/packages/opustags.nix> { };
betacode = pkgs.callPackage <niveum/packages/python3Packages/betacode.nix> { };
wrapScript = { packages ? [ ], name, script }: wrapScript = { packages ? [ ], name, script }:
pkgs.writers.writeDashBin name '' pkgs.writers.writeDashBin name ''
PATH=$PATH:${ PATH=$PATH:${
@@ -98,7 +99,7 @@ in rec {
''; '';
tag = wrapScript { tag = wrapScript {
packages = [ pkgs.vorbisTools pkgs.python3Packages.eyeD3 nur.opustags ]; packages = [ pkgs.vorbisTools pkgs.python3Packages.eyeD3 opustags ];
script = "${voidrice}/.local/bin/tag"; script = "${voidrice}/.local/bin/tag";
name = "tag"; name = "tag";
}; };
@@ -296,7 +297,7 @@ in rec {
''; '';
betacode = pkgs.writers.writePython3Bin "betacode" { betacode = pkgs.writers.writePython3Bin "betacode" {
libraries = [ nur.python3Packages.betacode ]; libraries = [ betacode ];
} '' } ''
import betacode.conv import betacode.conv
import sys import sys
@@ -405,4 +406,12 @@ in rec {
curl -L "https://github.com/Mic92/nix-index-database/releases/download/$tag/files" -o $XDG_RUNTIME_DIR/files-$tag curl -L "https://github.com/Mic92/nix-index-database/releases/download/$tag/files" -o $XDG_RUNTIME_DIR/files-$tag
mv $XDG_RUNTIME_DIR/files-$tag $HOME/.cache/nix-index/files mv $XDG_RUNTIME_DIR/files-$tag $HOME/.cache/nix-index/files
''; '';
} // nur } // {
devour = pkgs.callPackage <niveum/packages/devour.nix> { };
depp = pkgs.callPackage <niveum/packages/depp.nix> { };
text2pdf = pkgs.callPackage <niveum/packages/text2pdf.nix> { };
vimv = pkgs.callPackage <niveum/packages/vimv.nix> { };
when = pkgs.callPackage <niveum/packages/when.nix> { };
mahlzeit = pkgs.callPackage <niveum/packages/mahlzeit.nix> { };
inherit opustags;
}

22
packages/sncli.nix Normal file
View File

@@ -0,0 +1,22 @@
{ buildPythonPackage, buildPythonApplication, fetchPypi, requests, urwid }:
let
Simperium3 = buildPythonPackage rec {
pname = "Simperium3";
version = "0.1.3";
src = fetchPypi {
inherit pname version;
sha256 = "1j1w4dji39v44l96qq9kbrxpcjkjmika8065gwy8bf847f9fa76p";
};
propagatedBuildInputs = [ requests ];
};
in buildPythonApplication rec {
pname = "sncli";
version = "0.3.0";
src = fetchPypi {
inherit pname version;
sha256 = "18s5a6s2z7k14cbiyfdf98kw92r2hf1xwaavx67dxhadxm18xr4v";
};
propagatedBuildInputs = [ requests urwid Simperium3 ];
}

15
packages/text2pdf.nix Normal file
View File

@@ -0,0 +1,15 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "text2pdf";
version = "1.1";
src = fetchurl {
url = "http://www.eprg.org/pdfcorner/text2pdf/text2pdf.c";
sha256 = "002nyky12vf1paj7az6j6ra7lljwkhqzz238v7fyp7sfgxw0f7d1";
};
phases = [ "buildPhase" ];
buildPhase = ''
mkdir -p $out/bin
gcc -o $out/bin/text2pdf $src
'';
}

22
packages/vimv.nix Normal file
View File

@@ -0,0 +1,22 @@
{ lib, stdenv, bash, fetchFromGitHub }:
stdenv.mkDerivation {
name = "vimv";
src = fetchFromGitHub {
owner = "thameera";
repo = "vimv";
rev = "4152496c1946f68a13c648fb7e583ef23dac4eb8";
sha256 = "1fsrfx2gs6bqx7wk7pgcji2i2x4alqpsi66aif4kqvnpqfhcfzjd";
};
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out/bin
sed 's:#!/bin/bash:#!${bash}/bin/bash:' $src/vimv > $out/bin/vimv
chmod 755 $out/bin/vimv
'';
meta = with lib; {
homepage = https://github.com/thameera/vimv;
description = "Batch-rename files using Vim";
license = licenses.mit;
platforms = platforms.linux;
};
}

23
packages/when.nix Normal file
View File

@@ -0,0 +1,23 @@
{ lib, stdenv, perl, which }:
stdenv.mkDerivation {
name = "when";
version = "1.1.40";
src = builtins.fetchTarball {
url = "http://www.lightandmatter.com/when/when.tar.gz";
sha256 = "12d0zmvg66lwzr7q8zky0kz1x3w6q8dvyzm4x7lf1vy2z4pm4cvx";
};
nativeBuildInputs = [ which ];
buildInputs = [ perl ];
installFlags = [ "prefix=$(out)" ];
meta = with lib; {
homepage = "http://www.lightandmatter.com/when/when.html";
description = "An extremely simple personal calendar program";
longDescription = "When is an extremely simple personal calendar program, aimed at the Unix geek who wants something minimalistic.";
license = licenses.gpl2;
platforms = platforms.all;
};
}