12 , sqliteSupport ? true
18 frontend = buildNpmPackage {
19 pname = "gitea-frontend";
20 inherit (gitea) src version;
22 npmDepsHash = "sha256-Sp3xBe5IXys2Qro4x4HKs9dQOnlbstAmtIG6xOOktEk=";
24 # use webpack directly instead of 'make frontend' as the packages are already installed
26 BROWSERSLIST_IGNORE_OLD_DATA=true npx webpack
34 in buildGoModule rec {
38 src = fetchFromGitHub {
41 rev = "v${gitea.version}";
42 hash = "sha256-F1vvyf/FE/OIfDjM0CCOef/cXy+GPA+8n1AypE0r6p8=";
47 vendorHash = "sha256-iKf4ozCBcTJQ6bm6dX4dd4buVMGNDVF+rLuYkb7Zxw8=";
49 outputs = [ "out" "data" ];
51 patches = [ ./static-root-path.patch ];
53 # go-modules derivation doesn't provide $data
54 # so we need to wait until it is built, and then
55 # at that time we can then apply the substituteInPlace
56 overrideModAttrs = _: { postPatch = null; };
59 substituteInPlace modules/setting/server.go --subst-var data
62 subPackages = [ "." ];
64 nativeBuildInputs = [ makeWrapper ];
66 tags = lib.optionals sqliteSupport [ "sqlite" "sqlite_unlock_notify" ];
71 "-X main.Version=${version}"
72 "-X 'main.Tags=${lib.concatStringsSep " " tags}'"
77 ln -s ${frontend}/public $data/public
78 cp -R ./{templates,options} $data
80 cp -R ./options/locale $out/locale
82 wrapProgram $out/bin/gitea \
83 --prefix PATH : ${lib.makeBinPath [ bash coreutils git gzip openssh ]}
87 data-compressed = lib.warn "gitea.passthru.data-compressed is deprecated. Use \"compressDrvWeb gitea.data\"." (compressDrvWeb gitea.data {});
89 tests = nixosTests.gitea;
93 description = "Git with a cup of tea";
94 homepage = "https://about.gitea.com";
95 license = licenses.mit;
96 maintainers = with maintainers; [ ma27 techknowlogick SuperSandro2000 ];
97 mainProgram = "gitea";