mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-08-16 09:50:24 +03:00
call gradle2nix via flakes cli
This commit is contained in:
parent
30a0ace955
commit
c1536f4aef
17
flake.lock
17
flake.lock
@ -84,22 +84,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gradle2nix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1651167340,
|
||||
"narHash": "sha256-U+YBGk/c2jjp6uExGiyrO8+vGpLqeRu6BlhvNDzbfJo=",
|
||||
"owner": "kranzes",
|
||||
"repo": "gradle2nix",
|
||||
"rev": "5acbd615af9f26bbf11e5dd2b620c4d3cf06e01a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kranzes",
|
||||
"repo": "gradle2nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"mach-nix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@ -192,7 +176,6 @@
|
||||
"crane": "crane",
|
||||
"flake-utils-pre-commit": "flake-utils-pre-commit",
|
||||
"gomod2nix": "gomod2nix",
|
||||
"gradle2nix": "gradle2nix",
|
||||
"mach-nix": "mach-nix",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"node2nix": "node2nix",
|
||||
|
@ -44,12 +44,6 @@
|
||||
url = "github:ipetkov/crane";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# required for builder/translator java/gradle2nix
|
||||
gradle2nix = {
|
||||
url = "github:kranzes/gradle2nix";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
|
@ -18,6 +18,7 @@
|
||||
utils,
|
||||
# nixpkgs dependenies
|
||||
bash,
|
||||
coreutils,
|
||||
jq,
|
||||
writeScriptBin,
|
||||
callPackage,
|
||||
@ -28,7 +29,6 @@
|
||||
bash
|
||||
coreutils
|
||||
jq
|
||||
(callPackage externalSources.gradle2nix {})
|
||||
]
|
||||
''
|
||||
# accroding to the spec, the translator reads the input from a json file
|
||||
@ -40,7 +40,8 @@
|
||||
relPath=$(${jq}/bin/jq '.project.relPath' -c -r $jsonInput)
|
||||
|
||||
tmpDir=$(mktemp -d)
|
||||
gradle2nix --project $source --out-dir $tmpDir
|
||||
nix shell github:kranzes/gradle2nix/8921415b908bc847ee01009a1a5ddd40466533b7 -c \
|
||||
gradle2nix --project $source --out-dir $tmpDir
|
||||
|
||||
somehow format the json file created by gradle2nix $tmpDir/gradle-env.json > $outputFile
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user