Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 63 lines 1.4 kB view raw
1# Source: https://git.helsinki.tools/helsinki-systems/wp4nix/-/blob/master/default.nix 2# Licensed under: MIT 3# Slightly modified 4 5{ 6 lib, 7 pkgs, 8 newScope, 9 apps ? lib.importJSON (./. + "/${ncVersion}.json"), # Support out-of-tree overrides 10 callPackage, 11 ncVersion, 12 nextcloud-notify_push, 13}: 14 15let 16 packages = 17 self: 18 let 19 generatedJson = { 20 inherit apps; 21 }; 22 appBaseDefs = builtins.fromJSON (builtins.readFile ./nextcloud-apps.json); 23 24 in 25 { 26 # Create a derivation from the official Nextcloud apps. 27 # This takes the data generated from the go tool. 28 mkNextcloudDerivation = 29 { pname, data }: 30 pkgs.fetchNextcloudApp { 31 appName = pname; 32 appVersion = data.version; 33 license = appBaseDefs.${pname}; 34 teams = [ lib.teams.nextcloud ]; 35 inherit (data) 36 url 37 hash 38 description 39 homepage 40 ; 41 }; 42 43 } 44 // lib.mapAttrs ( 45 type: pkgs: 46 lib.makeExtensible ( 47 _: 48 lib.mapAttrs ( 49 pname: data: 50 self.mkNextcloudDerivation { 51 inherit pname data; 52 } 53 ) pkgs 54 // { 55 notify_push = nextcloud-notify_push.app; 56 } 57 ) 58 ) generatedJson; 59 60in 61(lib.makeExtensible (_: (lib.makeScope newScope packages))).extend ( 62 import ./thirdparty.nix { inherit ncVersion; } 63)