···
28
+
frontend = stdenv.mkDerivation (final: {
29
+
pname = "${finalAttrs.pname}-ui";
30
+
inherit (finalAttrs) version gitHash;
31
+
src = "${finalAttrs.src}/ui/v2.5";
25
-
src = fetchFromGitHub {
28
-
tag = "v${version}";
33
+
yarnOfflineCache = fetchYarnDeps {
34
+
yarnLock = "${final.src}/yarn.lock";
35
+
hash = finalAttrs.yarnHash;
32
-
frontend = stdenv.mkDerivation (final: {
34
-
pname = "${pname}-ui";
35
-
src = "${src}/ui/v2.5";
38
+
nativeBuildInputs = [
41
+
# Needed for executing package.json scripts
37
-
yarnOfflineCache = fetchYarnDeps {
38
-
yarnLock = "${final.src}/yarn.lock";
46
+
substituteInPlace codegen.ts \
47
+
--replace-fail "../../graphql/" "${finalAttrs.src}/graphql/"
42
-
nativeBuildInputs = [
45
-
# Needed for executing package.json scripts
50
-
substituteInPlace codegen.ts \
51
-
--replace-fail "../../graphql/" "${src}/graphql/"
53
+
export HOME=$(mktemp -d)
54
+
export VITE_APP_DATE='1970-01-01 00:00:00'
55
+
export VITE_APP_GITHASH=${finalAttrs.gitHash}
56
+
export VITE_APP_STASH_VERSION=v${finalAttrs.version}
57
+
export VITE_APP_NOLEGACY=true
59
+
yarn --offline run gqlgen
60
+
yarn --offline build
57
-
export HOME=$(mktemp -d)
58
-
export VITE_APP_DATE='1970-01-01 00:00:00'
59
-
export VITE_APP_GITHASH=${gitHash}
60
-
export VITE_APP_STASH_VERSION=v${version}
61
-
export VITE_APP_NOLEGACY=true
63
-
yarn --offline run gqlgen
64
-
yarn --offline build
80
+
src = fetchFromGitHub {
83
+
tag = "v${finalAttrs.version}";
90
+
"-X 'github.com/stashapp/stash/internal/build.buildstamp=1970-01-01 00:00:00'"
91
+
"-X 'github.com/stashapp/stash/internal/build.githash=${finalAttrs.gitHash}'"
92
+
"-X 'github.com/stashapp/stash/internal/build.version=v${finalAttrs.version}'"
93
+
"-X 'github.com/stashapp/stash/internal/build.officialBuild=false'"
97
+
"sqlite_math_functions"
86
-
"-X 'github.com/stashapp/stash/internal/build.buildstamp=1970-01-01 00:00:00'"
87
-
"-X 'github.com/stashapp/stash/internal/build.githash=${gitHash}'"
88
-
"-X 'github.com/stashapp/stash/internal/build.version=v${version}'"
89
-
"-X 'github.com/stashapp/stash/internal/build.officialBuild=false'"
93
-
"sqlite_math_functions"
100
+
subPackages = [ "cmd/stash" ];
96
-
subPackages = [ "cmd/stash" ];
103
+
cp -a ${frontend} ui/v2.5/build
99
-
cp -a ${frontend} ui/v2.5/build
100
-
# `go mod tidy` requires internet access and does nothing
101
-
echo "skip_mod_tidy: true" >> gqlgen.yml
102
-
# remove `-trimpath` fron `GOFLAGS` because `gqlgen` does not work with it
103
-
GOFLAGS="''${GOFLAGS/-trimpath/}" go generate ./cmd/stash
107
+
# `go mod tidy` requires internet access and does nothing
108
+
echo "skip_mod_tidy: true" >> gqlgen.yml
109
+
# remove `-trimpath` fron `GOFLAGS` because `gqlgen` does not work with it
110
+
GOFLAGS="''${GOFLAGS/-trimpath/}" go generate ./cmd/stash
110
-
updateScript = ./update.py;
112
-
inherit (nixosTests) stash;
113
-
version = testers.testVersion {
115
-
version = "v${version} (${gitHash}) - Unofficial Build - 1970-01-01 00:00:00";
117
+
updateScript = ./update.py;
119
+
inherit (nixosTests) stash;
120
+
version = testers.testVersion {
122
+
version = "v${finalAttrs.version} (${finalAttrs.gitHash}) - Unofficial Build - 1970-01-01 00:00:00";
121
-
mainProgram = "stash";
122
-
description = "Organizer for your adult videos/images";
123
-
license = lib.licenses.agpl3Only;
124
-
homepage = "https://stashapp.cc/";
125
-
changelog = "https://github.com/stashapp/stash/blob/v${version}/ui/v2.5/src/docs/en/Changelog/v${lib.versions.major version}${lib.versions.minor version}0.md";
126
-
maintainers = with lib.maintainers; [
128
+
mainProgram = "stash";
129
+
description = "Organizer for your adult videos/images";
130
+
license = lib.licenses.agpl3Only;
131
+
homepage = "https://stashapp.cc/";
132
+
changelog = "https://github.com/stashapp/stash/blob/v${finalAttrs.version}/ui/v2.5/src/docs/en/Changelog/v${lib.versions.major finalAttrs.version}${lib.versions.minor finalAttrs.version}0.md";
133
+
maintainers = with lib.maintainers; [