diff options
author | Aria Shrimpton <me@aria.rip> | 2024-01-29 22:48:13 +0000 |
---|---|---|
committer | Aria Shrimpton <me@aria.rip> | 2024-01-29 22:48:13 +0000 |
commit | babd6d51bc3e3b4665cec2b6d0750605c2d6c5bd (patch) | |
tree | 2a06caf45d02426e6092409509ed5b90ca1d8648 /nix | |
parent | 8b2556974cb70cddeedc6f4fb1d06d16c1cff5a1 (diff) |
nixos configuration
Diffstat (limited to 'nix')
-rw-r--r-- | nix/candelabra.nix | 31 | ||||
-rw-r--r-- | nix/configuration.nix | 61 | ||||
-rw-r--r-- | nix/racket-env.nix | 436 | ||||
-rw-r--r-- | nix/tex-env.nix | 16 |
4 files changed, 544 insertions, 0 deletions
diff --git a/nix/candelabra.nix b/nix/candelabra.nix new file mode 100644 index 0000000..da0a51c --- /dev/null +++ b/nix/candelabra.nix @@ -0,0 +1,31 @@ +inputs @ { + pkgs, + crane, + ... +}: let + inherit (pkgs) system; + toolchain = pkgs.rust-bin.fromRustupToolchain ((builtins.fromTOML (builtins.readFile ../src/rust-toolchain.toml)).toolchain // {profile = "minimal";}); + craneLib = crane.lib.${system}.overrideToolchain toolchain; + + rustCrate = craneLib.buildPackage { + pname = "candelabra-unwrapped"; + version = "1.0.0"; + + src = craneLib.cleanCargoSource (craneLib.path ../src); + doCheck = false; + propagatedBuildInputs = [(pkgs.callPackage ./racket-env.nix inputs)]; + + cargoExtraArgs = "-p candelabra-cli"; + }; +in + pkgs.runCommand "candelabra" {} '' + . ${pkgs.makeWrapper}/nix-support/setup-hook + mkdir -p $out/bin + makeWrapper ${rustCrate}/bin/candelabra $out/bin/candelabra \ + --set CANDELABRA_SRC_DIR ${pkgs.lib.sourceByRegex ../src [ + ".*crates" + ".*racket_specs.*" + ".*crates/library.*" + ".*crates/benchmarker.*" + ]} + '' diff --git a/nix/configuration.nix b/nix/configuration.nix new file mode 100644 index 0000000..c91059d --- /dev/null +++ b/nix/configuration.nix @@ -0,0 +1,61 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page, on +# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). +{ + config, + lib, + pkgs, + modulesPath, + candelabra, + ... +}: { + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + ]; + + environment.systemPackages = with pkgs; [ + git + just + candelabra # :D + ]; + + nix.settings.experimental-features = ["nix-command" "flakes" "ca-derivations"]; + + # Everything below here is just boring machine setup + networking.hostName = "candelabra"; + networking.useDHCP = lib.mkDefault true; + + time.timeZone = "Europe/London"; + i18n.defaultLocale = "en_US.UTF-8"; + + # SSH Access + services.openssh = { + enable = true; + settings.PermitRootLogin = "prohibit-password"; + }; + + users.users.root.openssh.authorizedKeys.keys = [ + "no-touch-required sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIPpKjZfzPN1KxVskFRnmTTCwzyCtjwcXVZc4i1rNfl9oAAAABHNzaDo= me@aria.rip" + ]; + + # Boot & filesystems + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sda"; + + boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/b7946a55-0573-4be9-801b-5ca9afc7b3f3"; + fsType = "ext4"; + }; + + swapDevices = [ + {device = "/dev/disk/by-uuid/9101d36f-dba8-4dda-8f4b-8dc8c1d37fe9";} + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + system.stateVersion = "23.11"; +} diff --git a/nix/racket-env.nix b/nix/racket-env.nix new file mode 100644 index 0000000..0577b97 --- /dev/null +++ b/nix/racket-env.nix @@ -0,0 +1,436 @@ +{pkgs ? import <nixpkgs> {}, ...}: let + inherit (pkgs) fetchurl fetchgit; + racket = pkgs.racket-minimal.overrideAttrs {disableDocs = true;}; + racketPkgs = [ + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/2d-lib.zip"; + hash = "sha256-ww55SdKLMzRGAqZ/oD16kqI5CKV2ZngF2HF6ZWFjJuc="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/at-exp-lib.zip"; + hash = "sha256-sXQclvE04pAZQ/4+cCHdvleyY4vtsqTf6FiiELHRMWc="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/cext-lib.zip"; + hash = "sha256-VfTX7zrI5v+5CLvsOoRKsluEZmWFcohgHAkIe8gmSaQ="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/class-iop-lib.zip"; + hash = "sha256-fK0IYDNzavtTgQL6Md4fQ3RciVSIs8y3JZ4croHjmt4="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/compatibility-doc.zip"; + hash = "sha256-M6+d9lEDTz8g4FDDZVc3IwAJocmfsrRkyWOpDt83vx4="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/compatibility-lib.zip"; + hash = "sha256-/PKFC2Y241HQ3xEwwmFtraq/2H8nnAg6Fb+qq7ISD6E="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/compiler-lib.zip"; + hash = "sha256-4LoHG01k0uXk8Vwnk5vT28fzMLpy2xU1s5GBISA4WkE="; + }) + (fetchgit { + url = "https://github.com/rmculpepper/custom-load.git"; + rev = "4e70205c29ab0672663fcae78ded32563f01414b"; + hash = "sha256-7+bNCqE2CXVCujQQ7zSRwmLfzisugKZju3cxHFLW1FY="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/data-doc.zip"; + hash = "sha256-gZ7katgLH0QVy/HIU59J0PQ6fdPc3wNGxB/qJcZ4KEM="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/data-enumerate-lib.zip"; + hash = "sha256-FGkam9SrD4Kbtp5xSrkUpGHETdEPhjbA0oIo+/v81Ao="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/data-lib.zip"; + hash = "sha256-aV6MUFMX+52VTfXLVHcTE4pDfpBNa/YtiFfOxtDIExQ="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/db-doc.zip"; + hash = "sha256-VQ8BikIWxt2F03Ezgj7b+jN/9GgHm1Gsk/BOn7jNxbw="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/db-lib.zip"; + hash = "sha256-dHrEGLC1lTtY5LxzctJLidc2Ui5WYyvzPxAWUB0dXMU="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/distributed-places-doc.zip"; + hash = "sha256-GOmVZ3epPYyYiGiixET4Dy+Mkj9dqHyLLmhUkHsRsuE="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/distributed-places-lib.zip"; + hash = "sha256-J5l5xXl5RWE+897HZ6pL7qDGvA/GIwetKbnIy7C9KBE="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/draw-doc.zip"; + hash = "sha256-N7UlNM4UL6bz2euaF+BudiDsmodtSi8JsJmHFFnkqaw="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/draw-lib.zip"; + hash = "sha256-0VDXpqq9OHi84f0xeM4kimTKhWTtC8BNKssngMHTI58="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/dynext-lib.zip"; + hash = "sha256-MM2wV5NF6g+++zznGFq+KY/adBmvlro9kde6zgYsJxU="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/errortrace-doc.zip"; + hash = "sha256-ryeOgts9TrbPHHAG3phb+y3dfXb8QyXMYEDmmqkpU8E="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/errortrace-lib.zip"; + hash = "sha256-7z8tK5dUMy0/70+2xp2ZaBkg5AZ0LyXZoa3+CedZ/q0="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/future-visualizer.zip"; + hash = "sha256-EKjwHb5N37oLVx6FhfwEbCGe0xGTx9SjE/NS+u670DE="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/future-visualizer-pict.zip"; + hash = "sha256-Ce/POR3foY65N5l/WYX4kZnqFHNDKhRRrQ8bGUo0dhM="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/gui-doc.zip"; + hash = "sha256-HfqLlJHAcGaAc/NYRlYO/RrSeBXjXxFWGevSNR+PEdU="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/gui-lib.zip"; + hash = "sha256-Bhdx/XIxeIzpd4FeIkKYVItyXRvFydF7z1Xl5UQcNMs="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/icons.zip"; + hash = "sha256-NOAONfoZdGXgC0svTfbhGdCh05SYXQvDL2oC3VKNe50="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/images-gui-lib.zip"; + hash = "sha256-CHMq7wMkB1lgU8u1JD/3gfAqwJ5dC6uqSqjcyA1EqO0="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/images-lib.zip"; + hash = "sha256-baRiP4lGcTlRfzBuxJqxLv0SN3KrXBXI6/RYbSrpKHY="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/macro-debugger.zip"; + hash = "sha256-fBAaN80NnPMo+CMsEOIGk4N8k0ugmWMY0xvDzZpXIS8="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/macro-debugger-text-lib.zip"; + hash = "sha256-Y8BAyT/tDnXucDS/1rtkdXaPuQ+RMUJBgF2pOLqlL7s="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/math-doc.zip"; + hash = "sha256-YsqL67+SNUnF01dRqXn34C1olA0dCp/c5+DNBMFk1Y4="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/math-lib.zip"; + hash = "sha256-Wn37KoXNhpGT6yV6d8akpaTLwCNl9x9fD0lv3jNaTgM="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/mzscheme-doc.zip"; + hash = "sha256-24LBl1+ugwvbCQsnO5/RqZZSC0KGA8b+VwbhfC6rBxw="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/net-cookies-doc.zip"; + hash = "sha256-AcKQErgA2B7QEpQR9iQDgE36/gyd36xF+tYvuIvhETo="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/net-cookies-lib.zip"; + hash = "sha256-l+RmHYXN4M2uc2m6ounl855vOUzmFZeAfIPFhc528IE="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/net-doc.zip"; + hash = "sha256-RaoCsuY7o7Fd5FAH8ZMXfVcq7XdwPxuNZRtD0k+Flpw="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/net-lib.zip"; + hash = "sha256-HzgU1D/EpQGbbYectRnpA4uh+pv61re4GPLzen68Nmk="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/option-contract-lib.zip"; + hash = "sha256-mLRp1leG6sourAxeMqMcPxytXGEL1h3Etvr3+uPA8QA="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/parser-tools-lib.zip"; + hash = "sha256-Xw3auBvOtukFx8neSIY0c04/9I2i1a70HuEa3WM7620="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/pconvert-lib.zip"; + hash = "sha256-Y4a+e/BYbF0SkEXJRIEABSZdJpHEFi0N01tB6DAS7kE="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/pict-doc.zip"; + hash = "sha256-9bnIk3dyOf7DiACiVymJCTPK4Q5jFNV0TZFU12monf4="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/pict-lib.zip"; + hash = "sha256-l1ZdFXhNOWwjeCfb9W11nYzofZ2jyIIkiovKqwfnnGg="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/planet-doc.zip"; + hash = "sha256-WO6d1Iz4QlSKKb1z8DzVeOPNeJejgETYaNVlExF6w5s="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/planet-lib.zip"; + hash = "sha256-RKUGOMNrzAQa4oZbTD7Ypek1/D0WMN1UBBgP5BAnV5U="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/plot-compat.zip"; + hash = "sha256-vW8NQqAAPCACLKW/k/jpOdwigQDPyI0UeqoOZZPGq2U="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/plot-doc.zip"; + hash = "sha256-pyQa+X2ACiCziiA0gdI4UZnq7YEbJWf3l8+vpw3xsfg="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/plot-gui-lib.zip"; + hash = "sha256-6KS5OlkQTuh/fsFROSSrtk1qoe5wUQTHkQeUu7mnE5E="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/plot-lib.zip"; + hash = "sha256-0wWpbgVyhvxlGobWQABSN3sfraJ/8zRyGCyMjFxOEPw="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/profile-doc.zip"; + hash = "sha256-prXhRSUdgmZPHiedccOMXoxSW3nNOw8439ulXflL+HA="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/profile-lib.zip"; + hash = "sha256-NazU186ZxVSFMLzQPTSGp2/YcA+jL46tkP8fBSOV0t8="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/r5rs-doc.zip"; + hash = "sha256-PvE0j6Vm7eY7mQhKzytOX3/NvdVC5hLZoTvqPsWZ0lM="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/r5rs-lib.zip"; + hash = "sha256-UGm52qxWjR3IAv27ZW8dzE2Z/bRBVcvSg9lqhFZzFGA="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/r6rs-doc.zip"; + hash = "sha256-ERtV9FUVC8wyXxKpcMxwX4XfnkSU/arD9KpTgdWHzrY="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/r6rs-lib.zip"; + hash = "sha256-c7sWPK1XxLpY3CyTYd7Nb1FQmEFQYMGx9yU7jPYvaH4="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/racket-doc.zip"; + hash = "sha256-jIHyZRa1UuEWjkz3ux63S65xefaVjJd/KarROUOij7g="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/racket-index.zip"; + hash = "sha256-tdXy9YsiK9VvyuX9m00motCLPkLg07qTg1JcJnBeDKI="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/rackunit-doc.zip"; + hash = "sha256-ayszYi2sbmmqiC3PluWS/HgTxEuZ0GsON4Fsy+d3jm0="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/rackunit-gui.zip"; + hash = "sha256-0enxbqsPzvd5NAiwolMLO3KV2w1GQ0mhsfrRHfjwfIk="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/rackunit-lib.zip"; + hash = "sha256-AGSHt83RU2mMEAqo4qAOC/Wsi47kOQfwRaQi0Bfhimc="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/rackunit-typed.zip"; + hash = "sha256-BRATj2ezo3/wsWu/1iSo29J1ek+6IJ7c1tsk8IxeXVE="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/readline-doc.zip"; + hash = "sha256-xEOzL6ZKOs2oBHzMCMEiuVFGam8ZP5InH39Qj+cvioI="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/readline-lib.zip"; + hash = "sha256-5vUA6uDepmr5bsSOZT12iYnWI515mYyoPIo3vu5H98M="; + }) + (fetchgit { + url = "https://github.com/tonyg/racket-rfc6455.git"; + rev = "e3a87e914e25841a6e1bb996aa001aeb178284bf"; + hash = "sha256-KZjnYFj8PWZ02EbDh11Hkdz/tlCcqEceLiIU5j/xAVU="; + }) + (fetchgit { + url = "https://github.com/emina/rosette.git"; + rev = "edf682df5e70420fcb31f71a5791c17875655bd2"; + hash = "sha256-hEJbuDWUKsbrUI5+eW4Xz74fdQiMhBzlCYs8eN4gP0o="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/sandbox-lib.zip"; + hash = "sha256-kUGSy9t71MdF4Ughmf/Z8wiSKjBQm8kj+jvKg9pCeSI="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/sasl-lib.zip"; + hash = "sha256-IGkeiVyF42SFxl5CRF8gl+VfnqIwZLYehb26APUcvic="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/scheme-doc.zip"; + hash = "sha256-YXpWhsVEs/8PXMeKdX2V/l8IjoXXKFQWudE26hviIfk="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/scheme-lib.zip"; + hash = "sha256-6EIiaWhwQrjUdsVtHX4fecUc1nSY+6tQmhUX2sG7vTw="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/scribble-doc.zip"; + hash = "sha256-wBIv2Vb2SnkqapPfD+rSTOngdOz0CdgH6vHx1I7vFk0="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/scribble-html-lib.zip"; + hash = "sha256-jRVoenXpTaOx4HV0T3Ed94ms+Nvx7lzgjQWOCBS0YXA="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/scribble-lib.zip"; + hash = "sha256-IWlHbsTmBqg/czmqDE7I0s+yKDFrYirdhypecBXs0jo="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/scribble-text-lib.zip"; + hash = "sha256-F96Q25Gwt5b+CwNNwITUHaMH1+lYdh14FxZnJoATYLQ="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/serialize-cstruct-lib.zip"; + hash = "sha256-o86NGWX4BTVCRKMbkfo3J0MoRKUNrXQhUnxVr5AZ+WI="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/simple-tree-text-markup-doc.zip"; + hash = "sha256-sZjbpsL/rgLRenTs5xUrqg3zPSni68OjHPf6CBcLfGE="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/simple-tree-text-markup-lib.zip"; + hash = "sha256-+cPUUINFks+6nHHkaHRz2Dm97sppgHYoz43l/3GktU8="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/slideshow-doc.zip"; + hash = "sha256-p15SKa2PaPIAFmJJcW5y+1exrhJLkAgLtiZlx/rGCOo="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/slideshow-lib.zip"; + hash = "sha256-NkhTy7JnD9+ybh+87ddHYmGS2KLIAaL2DJRYObGzV/s="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/snip-lib.zip"; + hash = "sha256-3byeewxPngrObo3+SwaAcd0/gdOfQooxrfsUr0PPUgs="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/source-syntax.zip"; + hash = "sha256-/Xt31tfLM0dn7c8OD5iE3b60paCJI1h2pvXEeUe8kSk="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/srfi-doc.zip"; + hash = "sha256-ZCE13bgDoeHsbWGpby/VVStOclAQa2dEtiFXw7OzEkQ="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/srfi-lib.zip"; + hash = "sha256-GKo2FjerLUVW0BJs9ZtVWbwsmR6wBdXP3H1Ej0b07xM="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/srfi-lite-lib.zip"; + hash = "sha256-jUjLINuySBeb4MGyq6yyHB+QmzoKYirN0TG4VPMkN70="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/string-constants-doc.zip"; + hash = "sha256-a3dxgMSgZvJ8xErLi9XfkDFWrSFOy7psorE+zOJdcVQ="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/string-constants-lib.zip"; + hash = "sha256-rxi7Eb5yWwg+xscUB5Fe73pIiEhupXE2bRz0wrOr2j0="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/syntax-color-doc.zip"; + hash = "sha256-toCEB7KBtgVmPVDE+oMn/58xXVFB7eev1ohgmp2OowM="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/syntax-color-lib.zip"; + hash = "sha256-zTdYzld5VBr3BQfUj14Yiplfa9UbKs9QFaPa/nAcliQ="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/testing-util-lib.zip"; + hash = "sha256-5we7jpxxrCkVmvJOVyZtNCQa1xwzlIcLdpvKAhp33Vw="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/tex-table.zip"; + hash = "sha256-fgclqu77DWMTa8cc/yuWr7sxjBgRxbhioGzbCn3sC/Y="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/typed-racket-compatibility.zip"; + hash = "sha256-qcvfVCTL+LNQoZFYcPY0AY224KPs9JRKYyZSCf86vrk="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/typed-racket-doc.zip"; + hash = "sha256-bAEHGIqPi2cwZMMMo+eeEuLaPxOJFgGhSTYK9Bh9TLY="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/typed-racket-lib.zip"; + hash = "sha256-vOdXNBs1VctqLl8veA43GAFbcvd+EPgk+fiKp/ZvUhM="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/typed-racket-more.zip"; + hash = "sha256-eeFmPWJsgl6aMWVKiikiFTO2bq0Zn9a/H7uX+BKe+AY="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/unix-socket-lib.zip"; + hash = "sha256-axVk7fvaysSndW2XtblYjcixkDVd8DwtsTWudSEpjEk="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/web-server-doc.zip"; + hash = "sha256-uUdsJGm5QgGAlaLQgUcMLqpgDmnCS6C+tHjfDi2aoyI="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/web-server-lib.zip"; + hash = "sha256-Ih5qlcFz67dHinuIK78S5JPIjeGD9iAZJ0VCAfF5V8M="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/wxme-lib.zip"; + hash = "sha256-4rDg2RlR0Cbag93JlGfZr5aRpwNWO6upvL/Qc7tvSzI="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/xrepl-doc.zip"; + hash = "sha256-2oD6aLYsIKYFt9Cuxoe4jorcCa7hotl71O6gsuM+qEk="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/xrepl-lib.zip"; + hash = "sha256-cMP5p7ykNtCUVXNVEWCfUGld83TrBd4+u9Cg+Bfqdjg="; + }) + (fetchurl { + url = "https://download.racket-lang.org/releases/8.10/pkgs/zo-lib.zip"; + hash = "sha256-q+cspYfV9f9zgldCQIr1vFjFDJuX3wj4MNwHb7cpB4Y="; + }) + ]; + collection = pkgs.stdenv.mkDerivation { + name = "raco-collection"; + buildInputs = [racket]; + phases = ["buildPhase"]; + + srcs = racketPkgs; + dontUnpack = true; + sourceRoot = "."; + + buildPhase = '' + mkdir -p pkgs/ + for f in $srcs; do + fname=`basename $f` + ln -s "$f" "pkgs/''${fname:33}" + done + + mkdir -p $out + export PLTADDONDIR=$out + + raco pkg install --batch --fail-fast --no-docs -j 4 --deps force --copy ./pkgs/* + ''; + + disallowedReferences = racketPkgs; + }; +in + pkgs.stdenv.mkDerivation { + name = "racket-wrapped"; + buildInputs = [pkgs.makeWrapper]; + phases = ["installPhase"]; + propagatedBuildInputs = [pkgs.z3]; + installPhase = '' + mkdir -p $out/bin + makeWrapper ${racket}/bin/racket $out/bin/racket \ + --set PLTADDONDIR ${collection}; + ''; + } diff --git a/nix/tex-env.nix b/nix/tex-env.nix new file mode 100644 index 0000000..96d621d --- /dev/null +++ b/nix/tex-env.nix @@ -0,0 +1,16 @@ +{pkgs, ...}: +pkgs.texlive.combine { + inherit + (pkgs.texlive) + scheme-small + microtype + sectsty + printlen + psnfss + helvetic + courier + biblatex + latex-bin + latexmk + ; +} |