diff options
Diffstat (limited to 'Biz/Bild.nix')
-rw-r--r-- | Biz/Bild.nix | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Biz/Bild.nix b/Biz/Bild.nix index b640a05..fdaba0e 100644 --- a/Biz/Bild.nix +++ b/Biz/Bild.nix @@ -153,6 +153,7 @@ in rec { ormolu python38Packages.black python38Packages.pylint + rustc shellcheck wemux ] ++ lib.optional nixpkgs.stdenv.isLinux [ @@ -168,5 +169,25 @@ in rec { pkgs = { inherit (nixpkgs) git; }; + rust = main: + let + data = analyze main; + rustc = nixpkgs.pkgs.rustc; + in stdenv.mkDerivation { + name = lib.string.concatStringsSep "::" data.namespace.path; + src = ../.; + nativeBuildInputs = [ rustc ]; + strictDeps = true; + buildPhase = '' + set -eux + mkdir -p $out/bin + : compiling with rustc + ${rustc}/bin/rustc \ + ${main} \ + -o $out/bin/${data.out} + ''; + installPhase = "exit 0"; + }; + image = nixpkgs.pkgs.dockerTools.buildImage; } |