app: move static files to /share

This commit is contained in:
Tad Fisher
2019-06-04 15:29:18 -07:00
parent 987c03604b
commit 65af918965
5 changed files with 6 additions and 8 deletions

54
app/src/dist/share/gradle-env.nix vendored Normal file
View File

@@ -0,0 +1,54 @@
# This file is generated by gradle2nix.
{ stdenvNoCC, lib, buildEnv, fetchurl }:
{ name, repositories, dependencies }:
let
mkPath = artifact: with artifact; lib.concatStringsSep "/" [
(lib.replaceChars ["."] ["/"] artifact.groupId)
artifact.artifactId
artifact.version
];
mkFilename = artifact: with artifact;
"${artifactId}-${version}${lib.optionalString (classifier != "") "-${classifier}"}.${extension}";
mkMavenUrls = repo: artifact:
mkArtifactUrl = base: artifact:
"${lib.removeSuffix "/" base}/${mkPath artifact}/${mkFilename artifact}";
fetchArtifact = artifact:
let
artifactPath = mkPath artifact;
artifactName = mkFilename artifact;
in stdenvNoCC.mkDerivation rec {
name = with artifact; lib.concatStrings [
(lib.replaceChars ["."] ["_"] groupId) "-"
(lib.replaceChars ["."] ["_"] artifactId) "-"
version
(lib.optionalString (classifier != "") "-${classifier}")
"-" type
];
src = fetchurl {
name = mkFilename artifact;
urls = map (url: mkArtifactUrl url artifact) repositories;
inherit (artifact) sha256;
};
phases = "installPhase fixupPhase";
installPhase = ''
mkdir -p $out/${artifactPath}
ln -s ${src} $out/${artifactPath}/${artifactName}
'';
};
in
buildEnv {
inherit name;
paths = map fetchArtifact dependencies;
}

7
app/src/dist/share/init.gradle vendored Normal file
View File

@@ -0,0 +1,7 @@
initscript {
dependencies {
classpath files("plugin.jar")
}
}
apply plugin: org.nixos.gradle2nix.Gradle2NixPlugin