nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 47 lines 1.4 kB view raw
1{ 2 lib, 3 generateSplicesForMkScope, 4 makeScopeWithSplicing', 5}: 6let 7 pluginHashes = lib.importJSON ./plugins.json; 8in 9makeScopeWithSplicing' { 10 otherSplices = generateSplicesForMkScope "reposilitePlugins"; 11 f = 12 self: 13 { 14 fetchPlugin = self.callPackage ( 15 { 16 lib, 17 fetchurl, 18 reposilite, 19 }: 20 lib.makeOverridable ( 21 { name, hash }: 22 let 23 inherit (reposilite) version; 24 25 fancyName = lib.concatStrings [ 26 (lib.toUpper (builtins.substring 0 1 name)) 27 (builtins.substring 1 ((builtins.stringLength name) - 1) name) 28 ]; 29 in 30 fetchurl { 31 url = "https://maven.reposilite.com/releases/com/reposilite/plugin/${name}-plugin/${version}/${name}-plugin-${version}-all.jar"; 32 inherit version hash; 33 34 meta = { 35 description = "${fancyName} plugin for Reposilite."; 36 homepage = "https://github.com/dzikoysk/reposilite"; 37 sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; 38 license = lib.licenses.asl20; 39 maintainers = with lib.maintainers; [ uku3lig ]; 40 inherit (reposilite.meta) platforms; 41 }; 42 } 43 ) 44 ) { }; 45 } 46 // builtins.mapAttrs (name: hash: self.fetchPlugin { inherit name hash; }) pluginHashes; 47}