home/home/extras.nix

103 lines
2.7 KiB
Nix

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;
python311Packages.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 setuptools
];
}
);
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=";
};
cleanvertising = pkgs.fetchurl {
name = "cleanvertising";
url = "https://dl.dafont.com/dl/?f=cleanvertising_nl";
downloadToTemp = true;
recursiveHash = true;
postFetch = ''
mkdir -p $out/share/fonts/opentype
${pkgs.unzip}/bin/unzip -j $downloadedFile 'Cleanvertising Black.ttf' -d $out/share/fonts/opentype
'';
sha256 = "sha256-kBrEt8mnSgHwEkqiRNkCtB7y0Tw8RGCuQ8LG0vw9t9k=";
};
stencila = pkgs.fetchurl {
name = "stencilia";
url = "https://dl.dafont.com/dl/?f=stencilia";
downloadToTemp = true;
recursiveHash = true;
postFetch = ''
mkdir -p $out/share/fonts/opentype
${pkgs.unzip}/bin/unzip -j $downloadedFile 'Stencilia-A.ttf' 'Stencilia-Bold.ttf' -d $out/share/fonts/opentype
'';
sha256 = "sha256-tZnDoxZnIrZkTwjOTUjGcqLaXtdZ2Tl6gcRXMclT6PY=";
};
all = [
qr-generator qr-paste
sax2 manrope metrophobic cleanvertising stencila
];
}