From 4975093f41ec56875d554d329c2a1ee0e1892034 Mon Sep 17 00:00:00 2001 From: morgan Date: Thu, 16 Nov 2023 11:53:22 +0800 Subject: [PATCH] init --- .gitignore | 3 +++ flake.nix | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .gitignore create mode 100644 flake.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4cbabb5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.envrc +.direnv/** +.vscode/** diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..c631529 --- /dev/null +++ b/flake.nix @@ -0,0 +1,29 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs_stable.url = "github:NixOS/nixpkgs/nixpkgs-23.05-darwin"; + flake-utils.url = "github:numtide/flake-utils"; + }; + outputs = { nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + }; + + pypkgs = ps: [ + ps.pip + ps.scipy + ps.numpy + ps.matplotlib + ]; + + in rec { + devShell = pkgs.mkShell { + name = "WRPLL-sim"; + buildInputs = with pkgs; [ + (python3.withPackages pypkgs) + ]; + }; + } + ); +} \ No newline at end of file