commit 66c2b4977462079a794d2f066d25cf8b2847fc33
parent 5afe17c1cc73f6f331acaf2c48ee14ebd84aefbb
Author: Katja (ctucx) <git@ctu.cx>
Date: Wed, 12 Mar 2025 10:23:27 +0100
parent 5afe17c1cc73f6f331acaf2c48ee14ebd84aefbb
Author: Katja (ctucx) <git@ctu.cx>
Date: Wed, 12 Mar 2025 10:23:27 +0100
rename `pkgs` to `packages` (also: move patches to `patches` directory)
27 files changed, 90 insertions(+), 90 deletions(-)
A
|
83
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
R
|
0
D
|
83
-------------------------------------------------------------------------------
diff --git a/configurations/nixos/wm/gnome.nix b/configurations/nixos/wm/gnome.nix @@ -5,7 +5,7 @@ nixpkgs.overlays = [(final: prev: { # patch gdm to automaticly select the first user gnome-shell = prev.gnome-shell.overrideAttrs (prevAttrs: { - patches = prevAttrs.patches ++ [ ../../../pkgs/gdm-autoselect-user.patch ]; + patches = prevAttrs.patches ++ [ ../../../packages/patches/gdm-autoselect-user.patch ]; }); # deactivate some backends
diff --git a/flake.nix b/flake.nix @@ -83,16 +83,16 @@ checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks inputs.self.deploy) (nixpkgsLib.filterAttrs (key: value: key != "x86_64-darwin") inputs.deploy-rs.lib); packages = forAllSystems (pkgs: ( - (loadDir (pkgsLoader pkgs) ./pkgs/all) // nixpkgsLib.optionalAttrs pkgs.stdenv.isDarwin (loadDir (pkgsLoader pkgs) ./pkgs/darwin) + (loadDir (pkgsLoader pkgs) ./packages/all) // nixpkgsLib.optionalAttrs pkgs.stdenv.isDarwin (loadDir (pkgsLoader pkgs) ./packages/darwin) )); nixosModules = loadDir pathLoader ./modules/nixos; darwinModules = loadDir pathLoader ./modules/darwin; overlays.nixpkgsUnstable = final: prev: { unstable = inputs.nixpkgsUnstable.legacyPackages.${prev.system}; }; - overlays.darwinOverlay = import ./pkgs/darwinOverlay.nix; - overlays.packages = final: prev: loadDir (path: path: final.callPackage path {}) ./pkgs/all; - overlays.darwinPackages = final: prev: loadDir (path: path: final.callPackage path {}) ./pkgs/darwin; + overlays.darwinOverlay = import ./packages/darwinOverlay.nix; + overlays.packages = final: prev: loadDir (path: path: final.callPackage path {}) ./packages/all; + overlays.darwinPackages = final: prev: loadDir (path: path: final.callPackage path {}) ./packages/darwin; nodes = loadDir importLoader ./machines; lib = loadDir (path: path: import path inputs) ./lib;
diff --git a/modules/nixos/gnome.nix b/modules/nixos/gnome.nix @@ -106,11 +106,11 @@ in { revert = true; }) - ../../pkgs/gdm-fix-wayland.patch + ../../packages/patches/gdm-fix-wayland.patch # Change hardcoded paths to nix store paths. (prev.substituteAll { - src = ../../pkgs/gdm-fix-paths.patch; + src = ../../packages/patches/gdm-fix-paths.patch; coreutils = final.coreutils; plymouth = final.plymouth; dbus = final.dbus;
diff --git a/packages/all/gotosocial/default.nix b/packages/all/gotosocial/default.nix @@ -0,0 +1,83 @@ +{ applyPatches, fetchFromGitHub, mkYarnPackage, buildGo123Module, lib, makeWrapper, installShellFiles, ... }: + +buildGo123Module rec { + + pname = "gotosocial"; + version = "0.19.0-${builtins.substring 0 6 rev}"; + rev = "69461c461b79dbeb9b55ba83d2b7308772194d7f"; + sha256 = "sha256-Eoy7bo8ewMvEac6ZCytg/NuttYJpMqWsMBceUQzOs4I="; + + + src = applyPatches { + src = fetchFromGitHub { + owner = "superseriousbusiness"; + repo = "gotosocial"; + inherit rev sha256; + }; + patches = []; + }; + + frontend-assets = mkYarnPackage { + name = "${pname}_${version}-frontend-assets"; + inherit src version; + + packageJSON = "${src}/web/source/package.json"; + yarnLock = "${src}/web/source/yarn.lock"; + + configurePhase = '' + cp -r $node_modules node_modules + chmod +w -R node_modules + ''; + + buildPhase = '' + mkdir -p ./web/source ./web/assets + + cp -r $src/web/source/. ./web/source + cp -r $src/web/assets/. ./web/assets + + export NODE_OPTIONS=--openssl-legacy-provider + node ./node_modules/ts-patch/bin/ts-patch.js install + yarn --offline --cwd ./web/source build + ''; + + distPhase = "true"; + installPhase = "cp -r ./web/assets $out"; + + meta.license = lib.licenses.agpl3Only; + }; + + ldflags = ["-s" "-w" "-extldflags '-static'" "-X 'main.Commit=${rev}'" "-X 'main.Version=${version}'"]; + tags = ["netgo" "osusergo" "static_build"]; + + vendorHash = null; + + nativeBuildInputs = [ installShellFiles ]; + buildInputs = [ makeWrapper ]; + + doCheck = false; + + installCheckPhase = '' + runHook preCheck + $out/bin/gotosocial --help + runHook postCheck + ''; + + postInstall = '' + mkdir -p $out/share/web/assets + + cp -r ./web/template $out/share/web/ + cp -rf ${frontend-assets}/. $out/share/web/assets + + installShellCompletion --cmd gotosocial \ + --bash <($out/bin/gotosocial completion bash) \ + --fish <($out/bin/gotosocial completion fish) \ + --zsh <($out/bin/gotosocial completion zsh) + ''; + + meta = with lib; { + description = "An ActivityPub social network server, written in Golang."; + homepage = "https://github.com/superseriousbusiness/gotosocial"; + license = licenses.agpl3Only; + }; + +}
diff --git a/pkgs/all/masto-fe-standalone/default.nix b/packages/all/masto-fe-standalone/default.nix
diff --git a/pkgs/all/gotosocial/default.nix b/pkgs/all/gotosocial/default.nix @@ -1,83 +0,0 @@ -{ applyPatches, fetchFromGitHub, mkYarnPackage, buildGo123Module, lib, makeWrapper, installShellFiles, ... }: - -buildGo123Module rec { - - pname = "gotosocial"; - version = "0.18.1-${builtins.substring 0 6 rev}"; - rev = "fd670c6a279e2aa54822546536dbf88b45a93051"; - sha256 = "sha256-4jV1G1HwpIST2Y27RAhJB3CoJevwuhxdzi615hj0Qv0="; - - - src = applyPatches { - src = fetchFromGitHub { - owner = "superseriousbusiness"; - repo = "gotosocial"; - inherit rev sha256; - }; - patches = []; - }; - - frontend-assets = mkYarnPackage { - name = "${pname}_${version}-frontend-assets"; - inherit src version; - - packageJSON = "${src}/web/source/package.json"; - yarnLock = "${src}/web/source/yarn.lock"; - - configurePhase = '' - cp -r $node_modules node_modules - chmod +w -R node_modules - ''; - - buildPhase = '' - mkdir -p ./web/source ./web/assets - - cp -r $src/web/source/. ./web/source - cp -r $src/web/assets/. ./web/assets - - export NODE_OPTIONS=--openssl-legacy-provider - node ./node_modules/ts-patch/bin/ts-patch.js install - yarn --offline --cwd ./web/source build - ''; - - distPhase = "true"; - installPhase = "cp -r ./web/assets $out"; - - meta.license = lib.licenses.agpl3Only; - }; - - ldflags = ["-s" "-w" "-extldflags '-static'" "-X 'main.Commit=${rev}'" "-X 'main.Version=${version}'"]; - tags = ["netgo" "osusergo" "static_build"]; - - vendorHash = null; - - nativeBuildInputs = [ installShellFiles ]; - buildInputs = [ makeWrapper ]; - - doCheck = false; - - installCheckPhase = '' - runHook preCheck - $out/bin/gotosocial --help - runHook postCheck - ''; - - postInstall = '' - mkdir -p $out/share/web/assets - - cp -r ./web/template $out/share/web/ - cp -rf ${frontend-assets}/. $out/share/web/assets - - installShellCompletion --cmd gotosocial \ - --bash <($out/bin/gotosocial completion bash) \ - --fish <($out/bin/gotosocial completion fish) \ - --zsh <($out/bin/gotosocial completion zsh) - ''; - - meta = with lib; { - description = "An ActivityPub social network server, written in Golang."; - homepage = "https://github.com/superseriousbusiness/gotosocial"; - license = licenses.agpl3Only; - }; - -}