1
Fork 0
mirror of https://github.com/RGBCube/GitHub2Forgejo synced 2025-07-26 04:37:43 +00:00

Add package.nix

This commit is contained in:
RGBCube 2024-05-29 10:01:10 +03:00
parent 9e56139a21
commit b404d0fc8e
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
2 changed files with 44 additions and 0 deletions

1
.gitignore vendored
View file

@ -4,3 +4,4 @@
!github2forgejo
!*.md
!*.nix

43
package.nix Normal file
View file

@ -0,0 +1,43 @@
{
lib,
stdenvNoCC,
nushell,
}:
stdenvNoCC.mkDerivation {
name = "github2forgejo";
version = "master";
src = ./.;
dontBuild = true;
dontConfigure = true;
nativeBuildInputs = [ nushell ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp github2forgejo $out/bin
runHook postInstall
'';
fixupPhase = ''
runHook preFixup
substituteInPlace $out/bin/github2forgejo \
--replace '/usr/bin/env nu' '${nushell}/bin/nu'
runHook postFixup
'';
meta = with lib; {
description = "GitHub to Forgejo migration script";
homepage = "https://git.rgbcu.be/RGBCube/GitHub2Forgejo";
license = licenses.gpl3Only;
maintainers = with maintainers; [ RGBCube ];
};
}