diff --git a/packages/projects.nix b/packages/projects.nix index 99deb71..0f82893 100644 --- a/packages/projects.nix +++ b/packages/projects.nix @@ -30,6 +30,8 @@ ./websites/stop-using-nix-env/project.nix ]; packages = filters.doFilter filters.packages rec { + cinny = pkgs.callPackage ./web-apps/cinny { inherit pins; }; + uptime-kuma = let dream = dream2nix.makeOutputs { source = pins.uptime-kuma; diff --git a/packages/sources/sources.json b/packages/sources/sources.json index ee92821..99bb786 100644 --- a/packages/sources/sources.json +++ b/packages/sources/sources.json @@ -1,5 +1,19 @@ { "pins": { + "cinny": { + "type": "GitRelease", + "repository": { + "type": "GitHub", + "owner": "cinnyapp", + "repo": "cinny" + }, + "pre_releases": false, + "version_upper_bound": null, + "version": "v2.1.1", + "revision": "20e1df43d02d0089f7fe46dbd6e4bf84d8d6e2a3", + "url": "https://api.github.com/repos/cinnyapp/cinny/tarball/v2.1.1", + "hash": "17qynrrrkb397q1q96i28ah172zm5if4nxr6lvynx903iwvcr9pz" + }, "gohugo-theme-ananke": { "type": "GitRelease", "repository": { diff --git a/packages/system-filter.nix b/packages/system-filter.nix index 4caf749..f8670e9 100644 --- a/packages/system-filter.nix +++ b/packages/system-filter.nix @@ -1,5 +1,6 @@ { packages = { + cinny = [ "x86_64-linux" ]; dvc = [ "x86_64-linux" ]; grafana = [ "x86_64-linux" ]; hci = [ "x86_64-linux" ]; diff --git a/packages/web-apps/cinny/default.nix b/packages/web-apps/cinny/default.nix new file mode 100644 index 0000000..cfbe26f --- /dev/null +++ b/packages/web-apps/cinny/default.nix @@ -0,0 +1,25 @@ +{ stdenvNoCC, fetchzip, pins }: + +let + inherit (pins) cinny; + repo = cinny.repository; +in + +let + app = stdenvNoCC.mkDerivation rec { + name = "cinny-bin"; + version = builtins.substring 1 (-1) cinny.version; + + src = fetchzip { + name = "cinny-tarball-${version}"; + url = "https://github.com/${repo.owner}/${repo.repo}/releases/download/${cinny.version}/cinny-${cinny.version}.tar.gz"; + sha256 = "sha256-u44fWBRfD/ZTXkuJHgcdiWo293aTqF0/Iz5rBPRuieg="; + }; + + buildCommand = '' + mkdir -p $out/share/www/cinny + cp -r $src/* $out/share/www/cinny + ''; + passthru.webroot = "${app}/share/www/cinny"; + }; +in app