Use new to-edn function to generate config.
This commit is contained in:
parent
355ba09f04
commit
cf2dd19b5f
40
flake.lock
generated
40
flake.lock
generated
@ -102,15 +102,49 @@
|
|||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1645296114,
|
||||||
|
"narHash": "sha256-y53N7TyIkXsjMpOG7RhvqJFGDacLs9HlyHeSTBioqYU=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "530a53dcbc9437363471167a5e4762c5fcfa34a1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "nixos-21.05",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"build-tools-src": "build-tools-src",
|
"build-tools-src": "build-tools-src",
|
||||||
"clj2nix": "clj2nix",
|
"clj2nix": "clj2nix",
|
||||||
"gitignore": "gitignore",
|
"gitignore": "gitignore",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"to-edn": "to-edn",
|
||||||
"utils": "utils_2"
|
"utils": "utils_2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"to-edn": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1653952083,
|
||||||
|
"narHash": "sha256-kmPtkcrbS6UtyjXdRWPnqQ0PFney+pPjpgYn3mLV28Y=",
|
||||||
|
"ref": "master",
|
||||||
|
"rev": "1fdfabc55c600c121fda29f4d7764fee56fbb958",
|
||||||
|
"revCount": 3,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.fudo.org/fudo-public/to-edn.git"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.fudo.org/fudo-public/to-edn.git"
|
||||||
|
}
|
||||||
|
},
|
||||||
"utils": {
|
"utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1637014545,
|
"lastModified": 1637014545,
|
||||||
@ -128,11 +162,11 @@
|
|||||||
},
|
},
|
||||||
"utils_2": {
|
"utils_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1652776076,
|
"lastModified": 1653893745,
|
||||||
"narHash": "sha256-gzTw/v1vj4dOVbpBSJX4J0DwUR6LIyXo7/SuuTJp1kM=",
|
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "04c1b180862888302ddfb2e3ad9eaa63afc60cf8",
|
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
10
flake.nix
10
flake.nix
@ -13,9 +13,11 @@
|
|||||||
url = "github:hercules-ci/gitignore.nix";
|
url = "github:hercules-ci/gitignore.nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
to-edn.url = "git+https://git.fudo.org/fudo-public/to-edn.git";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, utils, clj2nix, build-tools-src, gitignore, ... }:
|
outputs =
|
||||||
|
{ self, nixpkgs, utils, clj2nix, build-tools-src, gitignore, to-edn, ... }:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = nixpkgs.legacyPackages."${system}";
|
pkgs = nixpkgs.legacyPackages."${system}";
|
||||||
@ -25,8 +27,10 @@
|
|||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
lib = {
|
lib = {
|
||||||
mkClojureLib =
|
mkClojureLib = pkgs.callPackage ./mkClojureLib.nix {
|
||||||
pkgs.callPackage ./mkClojureLib.nix { inherit build-tools-jar; };
|
inherit build-tools-jar;
|
||||||
|
inherit (to-edn.lib) toEDN;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
devShell."${system}" =
|
devShell."${system}" =
|
||||||
pkgs.mkShell { buildInputs = with pkgs; [ clojure clj2nix ]; };
|
pkgs.mkShell { buildInputs = with pkgs; [ clojure clj2nix ]; };
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
{ lib, stdenv, callPackage, clojure, build-tools-jar, writeText }:
|
{ lib, stdenv, callPackage, clojure, build-tools-jar, writeText, toEDN }:
|
||||||
{ src, name, group, version, clj-deps, src-paths }:
|
{ src, name, group, version, clj-deps, src-paths }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
|
|
||||||
build-tools-deps = ''
|
build-tools-deps = toEDN {
|
||||||
{ :aliases { :build { :ns-build build :replace-deps { io.github.clojure/tools.build { :local/root "${build-tools-jar}" } } } } }'';
|
aliases.build = {
|
||||||
|
ns-build = "'build";
|
||||||
|
replace-deps."'io.github.clojure/tools.build"."local/root" =
|
||||||
|
"${build-tools-jar}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
classpath = clj-deps.makeClasspaths { };
|
classpath = clj-deps.makeClasspaths { };
|
||||||
|
|
||||||
@ -28,7 +33,7 @@ in stdenv.mkDerivation {
|
|||||||
|
|
||||||
clojure \
|
clojure \
|
||||||
-Scp .:${build-tools-jar}:${classpath} \
|
-Scp .:${build-tools-jar}:${classpath} \
|
||||||
-Sdeps ${build-tools-deps} \
|
-Sdeps ${builtins.trace build-tools-deps build-tools-deps} \
|
||||||
-X:build \
|
-X:build \
|
||||||
lib-uberjar \
|
lib-uberjar \
|
||||||
:project ${group}/${name} \
|
:project ${group}/${name} \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user