cinny: add wrapper
This commit is contained in:
parent
f73ed21933
commit
e66af6ccbe
@ -1,23 +1,18 @@
|
||||
{ lib
|
||||
, buildNpmPackage
|
||||
, fetchFromGitHub
|
||||
, writeText
|
||||
, jq
|
||||
, python3
|
||||
, pkg-config
|
||||
, pixman
|
||||
, cairo
|
||||
, pango
|
||||
, stdenv
|
||||
, darwin
|
||||
, conf ? { }
|
||||
{
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
python3,
|
||||
pkg-config,
|
||||
pixman,
|
||||
cairo,
|
||||
pango,
|
||||
stdenv,
|
||||
darwin,
|
||||
}:
|
||||
|
||||
let
|
||||
configOverrides = writeText "cinny-config-overrides.json" (builtins.toJSON conf);
|
||||
in
|
||||
buildNpmPackage rec {
|
||||
pname = "cinny";
|
||||
pname = "cinny-unwrapped";
|
||||
version = "4.0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
@ -35,7 +30,6 @@ buildNpmPackage rec {
|
||||
) "-D_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION=1";
|
||||
|
||||
nativeBuildInputs = [
|
||||
jq
|
||||
python3
|
||||
pkg-config
|
||||
];
|
||||
@ -44,15 +38,12 @@ buildNpmPackage rec {
|
||||
pixman
|
||||
cairo
|
||||
pango
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.CoreText
|
||||
];
|
||||
] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreText ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
cp -r dist $out
|
||||
jq -s '.[0] * .[1]' "config.json" "${configOverrides}" > "$out/config.json"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
32
pkgs/by-name/ci/cinny/package.nix
Normal file
32
pkgs/by-name/ci/cinny/package.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
cinny-unwrapped,
|
||||
jq,
|
||||
stdenvNoCC,
|
||||
writeText,
|
||||
conf ? { },
|
||||
}:
|
||||
let
|
||||
configOverrides = writeText "cinny-config-overrides.json" (builtins.toJSON conf);
|
||||
in
|
||||
if (conf == { }) then
|
||||
cinny-unwrapped
|
||||
else
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "cinny";
|
||||
inherit (cinny-unwrapped) version meta;
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [ jq ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
ln -s ${cinny-unwrapped}/* $out
|
||||
rm $out/config.json
|
||||
jq -s '.[0] * .[1]' "${cinny-unwrapped}/config.json" "${configOverrides}" > "$out/config.json"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
@ -4484,8 +4484,6 @@ with pkgs;
|
||||
|
||||
cht-sh = callPackage ../tools/misc/cht.sh { };
|
||||
|
||||
cinny = callPackage ../applications/networking/instant-messengers/cinny { };
|
||||
|
||||
cinny-desktop = callPackage ../applications/networking/instant-messengers/cinny-desktop { };
|
||||
|
||||
ckbcomp = callPackage ../tools/X11/ckbcomp { };
|
||||
|
Loading…
Reference in New Issue
Block a user