presentations_compsoc/flake.nix

50 lines
1.2 KiB
Nix
Raw Normal View History

2023-08-07 17:49:25 +00:00
{
description = "Skynet Presentations";
inputs = {
2023-09-27 23:15:41 +00:00
utils.url = "github:numtide/flake-utils";
2023-08-07 17:49:25 +00:00
2023-09-27 23:15:41 +00:00
# nix flake lock --update-input bfom
bfom.url = "gitlab:silver_rust/bfom";
2023-08-07 17:49:25 +00:00
};
2024-05-12 15:35:14 +00:00
/*
sudo nano /etc/nix/nix.conf
trusted-users = {username}
*/
nixConfig = {
extra-substituters = "https://nix-cache.skynet.ie/skynet-cache";
extra-trusted-public-keys = "skynet-cache:OdfA4Or0JcHiHf05fsiIR4nZT2z2yDEtkoLqhntGAz4=";
};
2024-05-12 15:36:50 +00:00
outputs = {
self,
nixpkgs,
bfom,
...
} @ inputs: let
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
in {
2023-08-07 17:49:25 +00:00
# nix run
apps.x86_64-linux.default = {
type = "app";
program = "${bfom.defaultPackage.x86_64-linux}/bin/cargo-bfom";
};
2023-09-27 23:15:41 +00:00
# `nix build`
packages.x86_64-linux.default = pkgs.stdenv.mkDerivation {
name = "slides.skynet.ie";
src = self;
buildPhase = "${bfom.defaultPackage.x86_64-linux}/bin/cargo-bfom";
installPhase = "mkdir -p $out; cp -R build/* $out";
};
2024-08-11 19:30:30 +00:00
devShells.x86_64-linux.default = pkgs.mkShell {
name = "Skynet presentations env";
nativeBuildInputs = [
bfom.defaultPackage.x86_64-linux
];
};
2023-09-27 23:15:41 +00:00
};
2023-08-07 17:49:25 +00:00
}