Adding nix flake to build website using BFOM

This commit is contained in:
Eoghan Conlon 2024-09-26 09:04:49 +01:00
parent 5446353755
commit 133c775699
2 changed files with 180 additions and 0 deletions

159
flake.lock Normal file
View file

@ -0,0 +1,159 @@
{
"nodes": {
"bfom": {
"inputs": {
"naersk": "naersk",
"nixpkgs": "nixpkgs_2",
"utils": "utils"
},
"locked": {
"lastModified": 1723500950,
"narHash": "sha256-t1eApFGI+JzLIW2YToLlDV20n+Nevk1q4fZBYU1m93I=",
"owner": "silver_rust",
"repo": "bfom",
"rev": "7f339f28442758ecc3f1697e3f70d441973664b9",
"type": "gitlab"
},
"original": {
"owner": "silver_rust",
"repo": "bfom",
"type": "gitlab"
}
},
"naersk": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1713520724,
"narHash": "sha256-CO8MmVDmqZX2FovL75pu5BvwhW+Vugc7Q6ze7Hj8heI=",
"owner": "nix-community",
"repo": "naersk",
"rev": "c5037590290c6c7dae2e42e7da1e247e54ed2d49",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "naersk",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1714091391,
"narHash": "sha256-68n3GBvlm1MIeJXadPzQ3v8Y9sIW3zmv8gI5w5sliC8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4c86138ce486d601d956a165e2f7a0fc029a03c1",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1714091391,
"narHash": "sha256-68n3GBvlm1MIeJXadPzQ3v8Y9sIW3zmv8gI5w5sliC8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4c86138ce486d601d956a165e2f7a0fc029a03c1",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1727173215,
"narHash": "sha256-OtMlWYCqBDbnEsByoows785Gem9CSMiXYEBiKKtStk4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "965289e5e07243f1cde3212d8bcaf726d36c5c46",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"bfom": "bfom",
"nixpkgs": "nixpkgs_3",
"utils": "utils_2"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

21
flake.nix Normal file
View file

@ -0,0 +1,21 @@
# Adapted for my use case from the flake.nix contained in https://gitlab.com/brendan.ie/v1
{
description = "My Personal site";
inputs = {
utils.url = "github:numtide/flake-utils";
bfom.url = "gitlab:silver_rust/bfom";
};
outputs = { self, nixpkgs, utils, bfom }: utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages."${system}";
in rec {
defaultPackage = pkgs.stdenv.mkDerivation {
name = "eoghanconlon.ie";
src = self;
buildPhase = "${bfom.defaultPackage."${system}"}/bin/cargo-bfom";
installPhase = "mkdir -p $out; cp -R build/* $out";
};
});
}