mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 19:21:04 +00:00
nextcloudPackages.hmr_enabler: init at 0+unstable-2024-08-24
This commit is contained in:
parent
51704cb008
commit
94db46ecad
38
pkgs/servers/nextcloud/packages/apps/hmr_enabler.nix
Normal file
38
pkgs/servers/nextcloud/packages/apps/hmr_enabler.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
php,
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
}:
|
||||
|
||||
php.buildComposerProject (finalAttrs: {
|
||||
pname = "hmr_enabler";
|
||||
# composer doesn't support our unstable version format
|
||||
# version = "0-unstable-2024-08-24";
|
||||
version = "0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nextcloud";
|
||||
repo = "hmr_enabler";
|
||||
rev = "d5d9d330d405ac4aa0de1a87d1133784560462ed";
|
||||
hash = "sha256-uLCpwvMVQ20z9vlO5q/GVPnaaQZ7ZjE8+V/zuqaB9Yo=";
|
||||
};
|
||||
|
||||
composerNoDev = false;
|
||||
|
||||
vendorHash = "sha256-ZuEEcFT+q49CCooEwdiu2Co345s0ZCC7jeEksi6A99A=";
|
||||
|
||||
postInstall = ''
|
||||
chmod -R u+w $out/share
|
||||
mv $out/share/php/hmr_enabler/* $out/
|
||||
rm -r $out/share $out/composer.* $out/Makefile $out/psalm.xml $out/tests
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = " Development Nextcloud app to enable apps to use hot module reloading";
|
||||
homepage = "https://github.com/nextcloud/hmr_enabler";
|
||||
changelog = "https://github.com/nextcloud/hmr_enabler/blob/master/CHANGELOG.md";
|
||||
license = lib.licenses.agpl3Only;
|
||||
maintainers = with lib.maintainers; [ onny ];
|
||||
};
|
||||
|
||||
})
|
|
@ -2,28 +2,58 @@
|
|||
# Licensed under: MIT
|
||||
# Slightly modified
|
||||
|
||||
{ lib, pkgs, newScope, apps }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
newScope,
|
||||
apps,
|
||||
callPackage,
|
||||
}:
|
||||
|
||||
let packages = self:
|
||||
let
|
||||
packages =
|
||||
self:
|
||||
let
|
||||
generatedJson = {
|
||||
inherit apps;
|
||||
};
|
||||
appBaseDefs = builtins.fromJSON (builtins.readFile ./nextcloud-apps.json);
|
||||
|
||||
in {
|
||||
in
|
||||
{
|
||||
# Create a derivation from the official Nextcloud apps.
|
||||
# This takes the data generated from the go tool.
|
||||
mkNextcloudDerivation = self.callPackage ({ }: { pname, data }:
|
||||
mkNextcloudDerivation = self.callPackage (
|
||||
{ }:
|
||||
{ pname, data }:
|
||||
pkgs.fetchNextcloudApp {
|
||||
appName = pname;
|
||||
appVersion = data.version;
|
||||
license = appBaseDefs.${pname};
|
||||
inherit (data) url hash description homepage;
|
||||
}) {};
|
||||
inherit (data)
|
||||
url
|
||||
hash
|
||||
description
|
||||
homepage
|
||||
;
|
||||
}
|
||||
) { };
|
||||
|
||||
} // lib.mapAttrs (type: pkgs:
|
||||
lib.makeExtensible (_: lib.mapAttrs (pname: data: self.mkNextcloudDerivation { inherit pname; inherit data; }) pkgs))
|
||||
generatedJson;
|
||||
}
|
||||
// lib.mapAttrs (
|
||||
type: pkgs:
|
||||
lib.makeExtensible (
|
||||
_:
|
||||
lib.mapAttrs (
|
||||
pname: data:
|
||||
self.mkNextcloudDerivation {
|
||||
inherit pname data;
|
||||
}
|
||||
) pkgs
|
||||
)
|
||||
) generatedJson;
|
||||
|
||||
in (lib.makeExtensible (_: (lib.makeScope newScope packages))).extend (selfNC: superNC: {})
|
||||
in
|
||||
(lib.makeExtensible (_: (lib.makeScope newScope packages))).extend (
|
||||
import ./thirdparty.nix
|
||||
)
|
||||
|
|
12
pkgs/servers/nextcloud/packages/thirdparty.nix
Normal file
12
pkgs/servers/nextcloud/packages/thirdparty.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
_:
|
||||
{ apps, callPackage, ... }:
|
||||
{
|
||||
|
||||
apps = apps.extend (
|
||||
self: super: {
|
||||
|
||||
hmr_enabler = callPackage ./apps/hmr_enabler.nix { };
|
||||
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Reference in a new issue