mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-15 16:45:15 +00:00
![aleksana](/assets/img/avatar_default.png)
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.
39 lines
1.1 KiB
Nix
39 lines
1.1 KiB
Nix
{ stdenv, pkgsBuildBuild, fetchFromGitHub, lib, nix-update-script }:
|
|
|
|
let
|
|
generator = pkgsBuildBuild.buildGoModule rec {
|
|
pname = "v2ray-domain-list-community";
|
|
version = "20241013063848";
|
|
src = fetchFromGitHub {
|
|
owner = "v2fly";
|
|
repo = "domain-list-community";
|
|
rev = version;
|
|
hash = "sha256-YFsz+fT2LPU4TakQ2V1PtETmnXI5r3qAaERAqM9mX5g=";
|
|
};
|
|
vendorHash = "sha256-NLh14rXRci4hgDkBJVJDIDvobndB7KYRKAX7UjyqSsg=";
|
|
meta = with lib; {
|
|
description = "community managed domain list";
|
|
homepage = "https://github.com/v2fly/domain-list-community";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ nickcao ];
|
|
};
|
|
};
|
|
in
|
|
stdenv.mkDerivation {
|
|
inherit (generator) pname version src meta;
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
${generator}/bin/domain-list-community -datapath $src/data
|
|
runHook postBuild
|
|
'';
|
|
installPhase = ''
|
|
runHook preInstall
|
|
install -Dm644 dlc.dat $out/share/v2ray/geosite.dat
|
|
runHook postInstall
|
|
'';
|
|
passthru = {
|
|
inherit generator;
|
|
updateScript = nix-update-script { };
|
|
};
|
|
}
|