1
Fork 0
mirror of https://github.com/RGBCube/github2forgejo synced 2026-01-13 00:31:02 +00:00

chore: make nix idiomatic

This commit is contained in:
RGBCube 2025-10-24 19:46:41 +03:00
parent e473d9db01
commit 04eac4ae30
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
2 changed files with 11 additions and 12 deletions

View file

@ -12,21 +12,21 @@
eachSystem = lib.genAttrs (import systems);
in {
packages = eachSystem (system: let pkgs = import nixpkgs { inherit system; }; in rec {
packages = eachSystem (system: let pkgs = import nixpkgs { inherit system; }; in {
inherit (self.overlays.github2forgejo pkgs pkgs) github2forgejo;
default = github2forgejo;
default = self.packages.${system}.github2forgejo;
});
overlays = rec {
default = github2forgejo;
github2forgejo = (final: super: {
github2forgejo = super.callPackage ./package.nix {};
overlays = {
default = self.overlays.github2forgejo;
github2forgejo = (final: _super: {
github2forgejo = final.callPackage ./package.nix {};
});
};
nixosModules = rec {
default = github2forgejo;
nixosModules = {
default = self.nixosModules.github2forgejo;
github2forgejo = { config, utils, lib, pkgs, ... }: let
cfg = config.services.github2forgejo;
in {

View file

@ -32,16 +32,15 @@ stdenvNoCC.mkDerivation {
runHook preFixup
substituteInPlace $out/bin/github2forgejo \
--replace '/usr/bin/env nu' '${nushell}/bin/nu'
--replace '/usr/bin/env nu' '${lib.getExe nushell}'
runHook postFixup
'';
meta = with lib; {
meta = {
description = "GitHub to Forgejo migration script";
homepage = "https://git.rgbcu.be/RGBCube/GitHub2Forgejo";
license = licenses.gpl3Only;
license = lib.licenses.gpl3Only;
mainProgram = "github2forgejo";
maintainers = with maintainers; [ RGBCube ];
};
}