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"; 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; outputs = { self, nixpkgs, flake-utils, ... }: with nixpkgs.lib;
flake-utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = import nixpkgs { inherit system; };
worther = callPackage ./worther.nix { pkgs = nixpkgs; }; worther = pkgs.callPackage ./worther.nix { pkgs = pkgs; };
in rec { in rec {
packages = flake-utils.lib.flattenTree { packages.worther = worther;
worther = nixpkgs.legacyPackages.x86_64-linux.worther; defaultPackage = self.packages.${system}.worther;
};
defaultPackage = packages.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> {}, ... }: { pkgs ? import <nixpkgs> {}, ... }:
let let
cljdeps = pkgs.callPackage ./deps.nix {}; cljdeps = pkgs.callPackage ./deps.nix {};
classpath = cljdeps.makeClasspaths {}; classpath = cljdeps.makeClasspaths {};
@ -16,7 +17,7 @@ in pkgs.stdenv.mkDerivation {
nativeBuildInputs = with pkgs; [ jre makeWrapper ]; nativeBuildInputs = with pkgs; [ jre makeWrapper ];
buildInputs = map (x: x.path) cljdeps.packages; buildInputs = map (x: x.paths) cljdeps.packages;
src = ./src; src = ./src;
@ -24,7 +25,7 @@ in pkgs.stdenv.mkDerivation {
buildPhase = '' buildPhase = ''
mkdir classes 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 jar cmf ${manifest} out.jar -C classes worther
''; '';