From 6f1fc85366f3b146eaaeb910919f7975d3084a11 Mon Sep 17 00:00:00 2001 From: Nuclear Squid Date: Tue, 8 Oct 2024 16:48:47 +0200 Subject: [PATCH 1/2] Added a `defauld.nix` file to build app on NixOS. --- default.nix | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 default.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..aae167c --- /dev/null +++ b/default.nix @@ -0,0 +1,36 @@ +with import {}; +# { lib +# , fetchPypi +# , python3Packages +# }: + +python3Packages.buildPythonApplication rec { + pname = "kalamine"; + version = "0.37"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-MdWP15d4J56ifLli01OIBZqgzpKQZf5f6OcR+3fP0zk="; + }; + + nativeBuildInputs = [ + python3Packages.hatchling + ]; + + propagatedBuildInputs = with python3Packages; [ + click + livereload + pyyaml + tomli + progress + ]; + + meta = with lib; { + description = "A cross-platform Keyboard Layout Maker"; + homepage = "https://github.com/OneDeadKey/kalamine"; + license = licenses.mit; + # maintainers = with maintainers; [ marsam ]; + mainProgram = "kalamine"; + }; +} From 45cc11a1340f7959d3d2240d72ca7a0b946434c8 Mon Sep 17 00:00:00 2001 From: Nuclear Squid Date: Wed, 9 Oct 2024 13:55:41 +0200 Subject: [PATCH 2/2] Quick fix --- default.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/default.nix b/default.nix index aae167c..0fbefa6 100644 --- a/default.nix +++ b/default.nix @@ -1,8 +1,6 @@ +# A nix alternative to `make dev`, run `nix-build` to build Kalamine on NixOS. + with import {}; -# { lib -# , fetchPypi -# , python3Packages -# }: python3Packages.buildPythonApplication rec { pname = "kalamine"; @@ -30,7 +28,6 @@ python3Packages.buildPythonApplication rec { description = "A cross-platform Keyboard Layout Maker"; homepage = "https://github.com/OneDeadKey/kalamine"; license = licenses.mit; - # maintainers = with maintainers; [ marsam ]; mainProgram = "kalamine"; }; }