diff options
author | SomeoneSerge <else@someonex.net> | 2024-07-31 12:57:01 +0000 |
---|---|---|
committer | SomeoneSerge <else@someonex.net> | 2024-07-31 12:57:01 +0000 |
commit | 19f7eac1ec285ab9d0b76b4c10e02c2e40dec8be (patch) | |
tree | af4836ffe590fe79308e5918d8e428ec540e57ae | |
parent | 72cf8cfcc59f792ff48eb28c3f760678dc10090c (diff) |
.#evanix: make callPackage-able
-rw-r--r-- | flake.nix | 31 | ||||
-rw-r--r-- | package.nix | 40 |
2 files changed, 41 insertions, 30 deletions
@@ -55,36 +55,7 @@ { system, pkgs }: { default = self.packages.${system}.evanix; - evanix = pkgs.stdenv.mkDerivation (finalAttrs: { - name = "evanix"; - - src = ./.; - nativeBuildInputs = with pkgs; [ - uthash - meson - ninja - pkg-config - makeWrapper - ]; - buildInputs = with pkgs; [ - cjson - highs - ]; - - mesonFlags = [ - (lib.mesonOption "NIX_EVAL_JOBS_PATH" (lib.getExe pkgs.nix-eval-jobs)) - ]; - - meta = { - homepage = "https://git.sinanmohd.com/evanix"; - - license = lib.licenses.gpl3; - platforms = supportedSystems; - mainProgram = "evanix"; - - maintainers = with lib.maintainers; [ sinanmohd ]; - }; - }); + evanix = pkgs.callPackage ./package.nix { }; evanix-py = pkgs.python3Packages.callPackage ./python-package.nix { }; pythonWithEvanix = diff --git a/package.nix b/package.nix new file mode 100644 index 0000000..56561f6 --- /dev/null +++ b/package.nix @@ -0,0 +1,40 @@ +{ + lib, + cjson, + highs, + makeWrapper, + meson, + ninja, + nix-eval-jobs, + pkg-config, + stdenv, + uthash, +}: +stdenv.mkDerivation (finalAttrs: { + name = "evanix"; + + src = ./.; + nativeBuildInputs = [ + uthash + meson + ninja + pkg-config + makeWrapper + ]; + buildInputs = [ + cjson + highs + ]; + + mesonFlags = [ (lib.mesonOption "NIX_EVAL_JOBS_PATH" (lib.getExe nix-eval-jobs)) ]; + + meta = { + homepage = "https://git.sinanmohd.com/evanix"; + + license = lib.licenses.gpl3; + platforms = lib.platforms.all; + mainProgram = "evanix"; + + maintainers = with lib.maintainers; [ sinanmohd ]; + }; +}) |