Initial commit

This commit is contained in:
Kiana Sheibani 2023-01-30 22:21:14 -05:00
commit b9a252f07a
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
2 changed files with 62 additions and 0 deletions

42
flake.lock Normal file
View file

@ -0,0 +1,42 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1675132057,
"narHash": "sha256-lq7VYB8J2wn35CeByP9760tR6mwQtztPze+J8O4fHdU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5b374db81f4a26de2cef6dae71b4478b362866a4",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

20
flake.nix Normal file
View file

@ -0,0 +1,20 @@
{
description = "The Sieve of Eratosthenes implemented in many different languages";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
currentDir = builtins.readDir ./.;
dirs = pkgs.lib.filterAttrs (_: v: v == "directory") currentDir;
in {
packages = builtins.mapAttrs (dir: _: pkgs.callPackage ./${dir} {}) dirs;
}
);
}