Oh, this has to be committed?

This commit is contained in:
Peter Selby 2021-08-03 11:44:54 -07:00
parent 72fcbc305b
commit 7a71de0df5
4 changed files with 16 additions and 14 deletions

View File

@ -7,16 +7,23 @@
flake-utils.url = "github:numtide/flake-utils";
};
# outputs = { self, nixpkgs, flake-utils, ... }: with nixpkgs.lib; let
# system = "x86_64-linux";
# pkgs = import nixpkgs { inherit system; };
# worther = pkgs.callPackage ./worther.nix { pkgs = pkgs; };
# in rec {
# packages.${system}.worther = worther;
# defaultPackage = packages.${system}.worther;
# };
outputs = { self, nixpkgs, flake-utils, ... }: with nixpkgs.lib;
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
worther = callPackage ./worther.nix { pkgs = nixpkgs; };
pkgs = import nixpkgs { inherit system; };
worther = pkgs.callPackage ./worther.nix { pkgs = pkgs; };
in rec {
packages = flake-utils.lib.flattenTree {
worther = nixpkgs.legacyPackages.x86_64-linux.worther;
};
defaultPackage = packages.worther;
packages.worther = worther;
defaultPackage = self.packages.${system}.worther;
});
}

View File

@ -1,6 +0,0 @@
{:deps
{juxt/crux-core {:mvn/version "21.05-1.17.0-beta"}
org.clojure/clojure {:mvn/version "1.10.3"}
org.clojure/core.match {:mvn/version "1.0.0"}
org.clojure/spec.alpha {:mvn/version "0.2.194"}
org.clojure/tools.deps.alpha {:mvn/version "0.11.926"}}}

View File

@ -1,5 +1,6 @@
{ pkgs ? import <nixpkgs> {}, ... }:
let
cljdeps = pkgs.callPackage ./deps.nix {};
classpath = cljdeps.makeClasspaths {};
@ -16,7 +17,7 @@ in pkgs.stdenv.mkDerivation {
nativeBuildInputs = with pkgs; [ jre makeWrapper ];
buildInputs = map (x: x.path) cljdeps.packages;
buildInputs = map (x: x.paths) cljdeps.packages;
src = ./src;
@ -24,7 +25,7 @@ in pkgs.stdenv.mkDerivation {
buildPhase = ''
mkdir classes
java -cp .:${classpath} clojure.main -e "(compile '${main-class}')"
java -cp ./src:${classpath} clojure.main -e "(compile '${main-class})"
jar cmf ${manifest} out.jar -C classes worther
'';