From cbc24320ef23514e7dacd995f9b3bb580fb11560 Mon Sep 17 00:00:00 2001 From: undefined Date: Tue, 19 Dec 2023 22:48:20 +0800 Subject: [PATCH] export xeger --- cyaron.nix | 15 +-------------- default.nix | 1 + flake.nix | 2 ++ judge.nix | 2 ++ xeger.nix | 17 +++++++++++++++++ 5 files changed, 23 insertions(+), 14 deletions(-) create mode 100644 xeger.nix diff --git a/cyaron.nix b/cyaron.nix index 098daf9..0952af2 100644 --- a/cyaron.nix +++ b/cyaron.nix @@ -2,20 +2,7 @@ , pkgs ? import { system = system; } }: let - xeger = pkgs.python3Packages.buildPythonPackage rec { - pname = "xeger"; - version = "0.4.0"; - format = "wheel"; - propagatedBuildInputs = with pkgs.python3Packages; [ - setuptools - ]; - src = pkgs.fetchPypi { - inherit pname version format; - sha256 = "sha256-oPVE+vRaxWopr05ii9HmmWM08JBFjXimFYFJDfGq0lI="; - python = "py3"; - dist = "py3"; - }; - }; + xeger = import ./xeger.nix { inherit system pkgs; }; in pkgs.python3Packages.buildPythonPackage rec { pname = "cyaron"; diff --git a/default.nix b/default.nix index 321f4ac..017933a 100644 --- a/default.nix +++ b/default.nix @@ -17,6 +17,7 @@ let mongodb5-cn = callPackage ./mongodb.nix { version = "5.0.10"; mirror = tuna; inherit system; }; mongodb4-cn = callPackage ./mongodb.nix { version = "4.4.16"; mirror = tuna; inherit system; }; cyaron = callPackage ./cyaron.nix { inherit system; }; + xeger = callPackage ./xeger.nix { inherit system; }; gcc = callPackage ./gccWithCache.nix { inherit system; }; judge = callPackage ./judge.nix { inherit system; }; }; diff --git a/flake.nix b/flake.nix index 5aba8a4..840c946 100644 --- a/flake.nix +++ b/flake.nix @@ -9,6 +9,8 @@ { pkgs = nixpkgs.legacyPackages.${system}; system = system; }; packages.cyaron = (import ./cyaron.nix) { pkgs = nixpkgs.legacyPackages.${system}; system = system; }; + packages.xeger = (import ./xeger.nix) + { pkgs = nixpkgs.legacyPackages.${system}; system = system; }; packages.mongodb = (import ./mongodb.nix) { pkgs = nixpkgs.legacyPackages.${system}; system = system; }; } diff --git a/judge.nix b/judge.nix index 1c3bce4..03ade9c 100644 --- a/judge.nix +++ b/judge.nix @@ -8,6 +8,7 @@ let gcc = import ./gccWithCache.nix { inherit pkgs; inherit system; }; php = pkgs.php.withExtensions ({ enabled, all }: [ ]); cyaron = import ./cyaron.nix { inherit pkgs; inherit system; }; + xeger = import ./xeger.nix { inherit pkgs; inherit system; }; in pkgs.buildEnv { name = "judge${if minimal then "-minimal" else ""}"; @@ -51,6 +52,7 @@ pkgs.buildEnv { numpy tkinter pillow + xeger cyaron ])) else [ ]) ++ (if system == "x86_64-linux" then [ pkgs.julia-bin diff --git a/xeger.nix b/xeger.nix new file mode 100644 index 0000000..736a7de --- /dev/null +++ b/xeger.nix @@ -0,0 +1,17 @@ +{ system ? builtins.currentSystem +, pkgs ? import { system = system; } +}: +pkgs.python3Packages.buildPythonPackage rec { + pname = "xeger"; + version = "0.4.0"; + format = "wheel"; + propagatedBuildInputs = with pkgs.python3Packages; [ + setuptools + ]; + src = pkgs.fetchPypi { + inherit pname version format; + sha256 = "sha256-oPVE+vRaxWopr05ii9HmmWM08JBFjXimFYFJDfGq0lI="; + python = "py3"; + dist = "py3"; + }; +}