From 12a48b108ae275a6fc919a9f797c969c31b26cbb Mon Sep 17 00:00:00 2001 From: Anish Lakhwara Date: Fri, 2 Sep 2022 19:45:28 +1000 Subject: [PATCH] add flake.nix --- flake.nix | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..5596fb2 --- /dev/null +++ b/flake.nix @@ -0,0 +1,36 @@ +{ + description = "Fork of vimwiki-cli so I can bump the deps lol"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs"; + }; + + outputs = { self, nixpkgs }: + let + pkgs = nixpkgs.legacyPackages.x86_64-linux; + my-python = pkgs.python3; + python-with-my-packages = my-python.withPackages (p: with p; [ + click + ]); + python-deps = with pkgs.python3Packages; [ + click + setuptools + ]; + in + { + packages.x86_64-linux.vimwiki-cli = pkgs.python3Packages.buildPythonPackage { + pname = "vimwiki-cli"; + src = ./.; + version = "1.0.0"; + bulidInputs = [ python-deps ]; + propagatedBuildInputs = [ python-deps ]; + doCheck = false; + }; + devShell.x86_64-linux = pkgs.mkShell { + buildInputs = [ + python-with-my-packages + self.packages.x86_64-linux.vimwiki-cli + ]; + }; + }; +}