mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 00:24:18 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
49 lines
1.2 KiB
Nix
49 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, coreutils, git, gnugrep, gnused, makeWrapper, inotify-tools }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "git-sync";
|
|
version = "0-unstable-2024-02-15";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "simonthum";
|
|
repo = "git-sync";
|
|
rev = "493b0155fb974b477b6ea623d6e41e13ddad8500";
|
|
hash = "sha256-hsq+kpB+akjbFKBeHMsP8ibrtygEG2Yf2QW9vFFIano=";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
dontBuild = true;
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp -a git-* $out/bin/
|
|
cp -a contrib/git-* $out/bin/
|
|
'';
|
|
|
|
wrapperPath = lib.makeBinPath ([
|
|
coreutils
|
|
git
|
|
gnugrep
|
|
gnused
|
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [ inotify-tools ]);
|
|
|
|
postFixup = ''
|
|
wrap_path="${wrapperPath}":$out/bin
|
|
|
|
wrapProgram $out/bin/git-sync \
|
|
--prefix PATH : $wrap_path
|
|
|
|
wrapProgram $out/bin/git-sync-on-inotify \
|
|
--prefix PATH : $wrap_path
|
|
'';
|
|
|
|
meta = {
|
|
description = "Script to automatically synchronize a git repository";
|
|
homepage = "https://github.com/simonthum/git-sync";
|
|
maintainers = with lib.maintainers; [ imalison ];
|
|
license = lib.licenses.cc0;
|
|
platforms = with lib.platforms; unix;
|
|
};
|
|
}
|