home/extras.nix

70 lines
1.8 KiB
Nix
Raw Normal View History

2023-10-12 22:51:18 +02:00
pkgs:
rec {
qr-generator = pkgs.writeShellScriptBin "qr" ''
${pkgs.qrencode}/bin/qrencode -t ansiutf8 "$@"
'';
qr-paste = pkgs.writeShellScriptBin "qrpaste" ''
pbpaste | ${pkgs.qrencode}/bin/qrencode -t ansiutf8
'';
challtools = (ps: with ps;
buildPythonPackage rec {
pname = "challtools";
version = "0.4.8";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-nfPAm7rgSMwGq2fgrG82xbdo/YIapDAVR+YGFROBBCU=";
};
propagatedBuildInputs = [
pyyaml jsonschema docker requests argcomplete google-cloud-storage
];
}
);
sax2 = pkgs.fetchurl {
name = "SAX2";
url = "https://abrudz.github.io/SAX2/SAX2.ttf";
sha256 = "sha256-DgvDWXO2fnKZNu9EvQOq8GNMTU3PUdp85+/0ZHdRXZc=";
recursiveHash = true;
downloadToTemp = true;
postFetch = ''
mkdir -p $out/share/fonts/truetype
mv $downloadedFile $out/share/fonts/truetype/SAX2.ttf
'';
};
manrope = pkgs.fetchurl {
name = "manrope";
url = "https://www.gent.media/assets/manrope/manrope.zip";
downloadToTemp = true;
recursiveHash = true;
postFetch = ''
mkdir -p $out/share/fonts
${pkgs.unzip}/bin/unzip -j $downloadedFile 'fonts/otf/*.otf' -d $out/share/fonts/opentype
'';
sha256 = "sha256-9FYNbuQQ6j35eUizGT2hUzp2s6Cc8x3IgU7XPxAumUY=";
};
metrophobic = pkgs.fetchurl {
name = "metrophobic";
url = "https://www.fontsquirrel.com/fonts/download/metrophobic";
downloadToTemp = true;
recursiveHash = true;
postFetch = ''
mkdir -p $out/share/fonts/opentype
${pkgs.unzip}/bin/unzip -j $downloadedFile 'Metrophobic.otf' -d $out/share/fonts/opentype
'';
sha256 = "sha256-ASDT1T+6/n4HR0ubgkn0qwdijY91VVL2Y9OUkKQMKKc=";
};
all = [ qr-generator qr-paste sax2 manrope metrophobic ];
}