diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000000000000000000000000000000000000..b2d5e88e33d0a46218954773d8fbdc2e5b4b4db4 --- /dev/null +++ b/flake.lock @@ -0,0 +1,123 @@ +{ + "nodes": { + "fenix": { + "inputs": { + "nixpkgs": [ + "typst", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1686291735, + "narHash": "sha256-mpq2m6TN3ImqqUqA4u93NvkZu5vH//3spqjmPRbRlvA=", + "owner": "nix-community", + "repo": "fenix", + "rev": "6e6a94c4d0cac4821b6452fbae46609b89a8ddcf", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1687171271, + "narHash": "sha256-BJlq+ozK2B1sJDQXS3tzJM5a+oVZmi1q0FlBK/Xqv7M=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "abfb11bd1aec8ced1c9bb9adfe68018230f4fb3c", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1685566663, + "narHash": "sha256-btHN1czJ6rzteeCuE/PNrdssqYD2nIA4w48miQAFloM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "4ecab3273592f27479a583fb6d975d4aba3486fe", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "typst": "typst" + } + }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1686239338, + "narHash": "sha256-c6Mm7UnDf3j3akY3YB3rELFA76QRbB8ttSBsh00LWi0=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "9c03aa1ac2e67051db83a85baf3cfee902e4dd84", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "typst": { + "inputs": { + "fenix": "fenix", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1689084678, + "narHash": "sha256-igNAs3946Mq8GjOSrDnmcIxjrVMPbYGC86EUHIDAugM=", + "owner": "typst", + "repo": "typst", + "rev": "9b1a2b41f0bb2d62106e029a5a0174dcf07ae0d2", + "type": "github" + }, + "original": { + "owner": "typst", + "ref": "main", + "repo": "typst", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000000000000000000000000000000000000..ced12c3eac79a6691425414f0e92e8d70a91f102 --- /dev/null +++ b/flake.nix @@ -0,0 +1,36 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=23.05"; + flake-utils.url = "github:numtide/flake-utils"; + typst = { + url = "github:typst/typst/main"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { self, nixpkgs, flake-utils, typst }: + flake-utils.lib.eachSystem [ "x86_64-linux" ] (system: + let + pkgs = import nixpkgs { inherit system; }; + typst-pkg = typst.packages.${system}.default; + pyPkgs = pkgs.python3Packages; + in rec { + packages = {}; + devShells = { + default = pkgs.mkShell { + buildInputs = [ + pkgs.graphviz + + pyPkgs.ipython + pyPkgs.numpy + pyPkgs.pygraphviz + pyPkgs.pytest + pyPkgs.networkx + + typst-pkg + ]; + }; + }; + } + ); +}