This commit is contained in:
rhiannon morris 2025-03-03 00:08:57 +01:00
commit 5323992f5b
11 changed files with 292 additions and 0 deletions

19
apps/basilisk.nix Normal file
View file

@ -0,0 +1,19 @@
{ pkgs ? import <nixpkgs> {} }:
let
version = "20250220145130";
sha256 = "sha256-DAlBmfBdkv8wwghykxJ4H5TSlGBhmdLaWzv35rNTDzE=";
basilisk = pkgs.fetchzip {
url = "https://dl.basilisk-browser.org/" +
"basilisk-${version}.linux-x86_64-gtk3.tar.xz";
inherit sha256;
};
in
pkgs.buildFHSEnv {
pname = "basilisk";
inherit version;
targetPkgs = pkgs:
(with pkgs; [ glib dbus-glib gtk3 alsa-lib ]) ++
(with pkgs.xorg; [ libX11 libXt ]);
runScript = "${basilisk}/basilisk";
}

View file

@ -0,0 +1,13 @@
{ pkgs ? import <nixpkgs> {} }:
let inherit (pkgs) stdenv firefox-esr; in
stdenv.mkDerivation {
pname = "firefox-esr-alias";
inherit (firefox-esr) version;
buildInputs = [ firefox-esr ];
dontUnpack = true;
installPhase = ''
mkdir -p $out/bin
ln -s ${firefox-esr}/bin/firefox-esr $out/bin/firefox-esr
'';
}

17
apps/isabelle.nix Normal file
View file

@ -0,0 +1,17 @@
{ pkgs ? import <nixpkgs> {},
version ? "2024",
}:
let
isabelle = pkgs.fetchzip {
url = "https://isabelle.in.tum.de/dist/Isabelle${version}_linux.tar.gz";
sha256 = "08d0zg4j12rya0qphdjfvxmy02mhrbzc6i1wy0hjfklpk2x1ml2s";
};
in
pkgs.buildFHSEnv {
pname = "isabelle";
inherit version;
targetPkgs = pkgs:
(with pkgs; [ zlib fontconfig ]) ++
(with pkgs.xorg; [ libX11 libXt libXext libXrender libXtst libXi ]);
runScript = "${isabelle}/Isabelle${version}";
}

27
apps/multi-ghc.nix Normal file
View file

@ -0,0 +1,27 @@
{ pkgs ? import <nixpkgs> {},
versions ? [ "8.10" "9.0" "9.2" "9.4" "9.6" "9.8" "9.10" "9.12" ],
}:
let
inherit (builtins) attrValues replaceStrings;
inherit (pkgs) lib stdenv haskell;
toPkg = version:
"ghc" + replaceStrings ["."] [""] version;
ghcs = lib.genAttrs versions
(v: haskell.compiler.${toPkg v});
mkLinkCmd = version: pkg: ''
ln -s ${pkg}/bin/ghc $out/bin/ghc-${version}
ln -s ${pkg}/bin/ghci $out/bin/ghci-${version}
ln -s ${pkg}/bin/ghc-pkg $out/bin/ghc-pkg-${version}
'';
in
stdenv.mkDerivation {
name = "multi-ghc";
buildInputs = attrValues ghcs;
dontUnpack = true;
installPhase = lib.concatLines
([ "mkdir -p $out/bin" ] ++
lib.mapAttrsToList mkLinkCmd ghcs);
}

38
flake.nix Normal file
View file

@ -0,0 +1,38 @@
{ description = "niss's silly extra packages";
outputs = all@{ self, nixpkgs, ... }:
let
inherit (nixpkgs.lib) genAttrs optionalAttrs systems;
forAllSystems = genAttrs systems.flakeExposed;
getCallPackage = system: nixpkgs.legacyPackages.${system}.callPackage;
ifLinux64 = system: attrs: optionalAttrs (system == "x86_64-linux") attrs;
linuxPackageNames =
[ "basilisk" "firefox-esr-alias" "isabelle" "multi-ghc" ];
fontNames =
[ "constructium" "fairfax-hd" "kreative-square" "muller"
"pragmatapro" "teranoptia" ];
linuxAppNames = [ "basilisk" "isabelle" "firefox-esr-alias" ];
linuxAppExes = { "firefox-esr-alias" = "firefox-esr"; };
packagesInDir = names: dir: call:
genAttrs names (pkg: call ./${dir}/${pkg}.nix {});
linuxOnly = packagesInDir linuxPackageNames "apps";
fonts = packagesInDir fontNames "fonts";
all = system: call: ifLinux64 system (linuxOnly call) // fonts call;
makeApp = pkgs: name: {
type = "app";
program = "${pkgs.${name}}/bin/${linuxAppExes.${name} or name}";
};
linuxApps = call: genAttrs linuxAppNames (makeApp (linuxOnly call));
in {
packages = forAllSystems (s: all s (getCallPackage s));
apps = forAllSystems (s: ifLinux64 s (linuxApps (getCallPackage s)));
overlays = forAllSystems (s: final: prev: all s final.callPackage);
};
}

34
fonts/constructium.nix Normal file
View file

@ -0,0 +1,34 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation rec {
pname = "constructium";
version = "2024-06-01";
src = pkgs.fetchzip {
url = "https://github.com/kreativekorp/open-relay/releases/download" +
"/2024-06-01/Constructium.zip";
hash = "sha256-W4MLyUq70igpN03557vS4s9nTTQC/2JT5ObA6ctj4wA=";
stripRoot = false;
};
installPhase = ''
dir=$out/share/fonts/opentype
mkdir -p $dir
cp ${src}/*.ttf $dir
'';
outputHashMode = "recursive";
outputHash = "sha256-80pNO5RtEhPfOzHzbDu2046Fnn+rUyYIOEw2OkMWXeg=";
meta = {
homepage = "http://www.kreativekorp.com/software/fonts/constructium";
description = "fork of Gentium with conlang support";
longDescription = ''
Constructium is a fork of SIL Gentium designed specifically to support
constructed scripts as encoded in the
[Under-ConScript Unicode Registry][ucsur].
[ucsur]: https://www.kreativekorp.com/ucsur
'';
platforms = pkgs.lib.platforms.all;
};
}

36
fonts/fairfax-hd.nix Normal file
View file

@ -0,0 +1,36 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation rec {
pname = "fairfax-hd";
version = "2024-06-01";
src = pkgs.fetchzip {
url = "https://github.com/kreativekorp/open-relay/releases/download" +
"/2024-06-01/FairfaxHD.zip";
hash = "sha256-kwdpWFOYhXt0HNqfWP3EeKYhJWgKsRs7cAbzHEasM80=";
stripRoot = false;
};
installPhase = ''
dir=$out/share/fonts/opentype
mkdir -p $dir
cp ${src}/*.ttf $dir
'';
outputHashMode = "recursive";
outputHash = "sha256-oNWvAFZ1ntjtSEreI4daf/i7yhRhGnHFPTyHj1g2l3I=";
meta = {
homepage = "https://www.kreativekorp.com/software/fonts/fairfaxhd";
description = "monospace font with support for many conlangs";
longDescription = ''
Fairfax HD is a halfwidth scalable monospace font for terminals, text
editors, IDEs, etc. It supports many scripts and a large number of Unicode
blocks as well as constructed scripts as encoded in the
[Under-ConScript Unicode Registry][ucsur], pseudographics and
semigraphics, and tons of private use characters.
[ucsur]: https://www.kreativekorp.com/ucsur
'';
platforms = pkgs.lib.platforms.all;
};
}

32
fonts/kreative-square.nix Normal file
View file

@ -0,0 +1,32 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation rec {
pname = "kreative-square";
version = "2024-06-01";
src = pkgs.fetchzip {
url = "https://github.com/kreativekorp/open-relay/releases/download" +
"/2024-06-01/KreativeSquare.zip";
hash = "sha256-Ftr3/SWyUahNeX9d/Yddkltf9W4GIN3rXGLO6TTubSA=";
stripRoot = false;
};
installPhase = ''
dir=$out/share/fonts/opentype
mkdir -p $dir
cp ${src}/*.ttf $dir
'';
outputHashMode = "recursive";
outputHash = "sha256-ZJ2cAYzCDL8VOhzBhzvoyCJSrHR6XkysLtZ3tUFb6mA=";
meta = {
homepage = "http://www.kreativekorp.com/software/fonts/ksquare";
description = "fullwidth monospace font for pseudographics";
longDescription = ''
Kreative Square is a fullwidth scalable monospace font designed
specifically to support pseudographics, semigraphics, and private use
characters.
'';
platforms = pkgs.lib.platforms.all;
};
}

19
fonts/muller.nix Normal file
View file

@ -0,0 +1,19 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation rec {
pname = "muller";
version = "2015";
buildInputs = [ pkgs.unzip ];
src = pkgs.requireFile {
name = "Muller.zip";
url = "https://cloud.niss.website";
hash = "sha256-TfVk4El8geTSTsMko1Ej91it/OitXFloihpAAMcGAlg=";
};
sourceRoot = ".";
installPhase = ''
mkdir -p $out/share/fonts/truetype
find Muller -name '*.ttf' -exec cp {} $out/share/fonts/truetype \;
'';
}

23
fonts/pragmatapro.nix Normal file
View file

@ -0,0 +1,23 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation rec {
pname = "pragmatapro";
version = "0.830";
buildInputs = [ pkgs.woff2 pkgs.unzip ];
src = pkgs.requireFile {
name = "PPw-usp24.zip";
url = "https://fsd.it/shop/fonts/pragmatapro";
hash = "sha256-9su/so8ylfIvuztqXCwApN5S4xs38ZzO9raQZDr9pzQ=";
};
sourceRoot = ".";
installPhase = ''
subdir="PragmataPro${version}W"
for font in $subdir/*.woff2; do
${pkgs.woff2}/bin/woff2_decompress $font
done
mkdir -p $out/share/fonts/truetype
cp $subdir/*.ttf $out/share/fonts/truetype
'';
}

34
fonts/teranoptia.nix Normal file
View file

@ -0,0 +1,34 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation rec {
pname = "teranoptia";
version = "0.2";
src = pkgs.fetchzip {
url = "https://gitlab.com/arielmartinperez/teranoptia/" +
"-/archive/main/teranoptia-main.zip";
hash = "sha256-kvjsf8Y98Fx5SPAQ2i/vJoSlJJLqcgt3pJHc8MkrG14=";
};
installPhase = ''
dir=$out/share/fonts/opentype
mkdir -p $dir
cp ${src}/fonts/Teranoptia-Furiae.otf $dir
'';
outputHashMode = "recursive";
outputHash = "sha256-L0h7+KDtY1reqvik6hGpVYl5pkbWRCpuJlU2VJyOWBU=";
meta = {
homepage = "https://www.tunera.xyz/fonts/teranoptia";
description = "a font for making creatures";
longDescription = ''
Teranoptia is a typeface without letters, a peculiar contraption that
allows you to imagine chimeric creatures just by typing letters with your
keyboard. Its design has been inspired by the Bayeux Tapestry and by
medieval illustrations, as well as by children's books. You can use it to
create border ornaments, to daydream about monsters or just to spice your
layouts with marginalia.
'';
platforms = pkgs.lib.platforms.all;
};
}