diff options
author | Maciej Krüger <mkg20001@gmail.com> | 2024-01-05 16:34:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-05 16:34:07 +0100 |
commit | 349e0c2870a63d97eb511610af00193c6cda7db0 (patch) | |
tree | c49cab94581318904919d138fb08698dc5c6cbeb /pkgs/development/compilers/dart | |
parent | bbc6e36b5b7deb2403fc3e2b34f3353f1bf39923 (diff) | |
parent | 5a5db92870a31076ad2e611ecae9159d490b5d69 (diff) |
Merge pull request #263345 from hacker1024/feature/pub2nix
dart: Use Nix instead of Pub
Diffstat (limited to 'pkgs/development/compilers/dart')
11 files changed, 136 insertions, 73 deletions
diff --git a/pkgs/development/compilers/dart/package-overrides/flutter-secure-storage-linux/default.nix b/pkgs/development/compilers/dart/package-overrides/flutter-secure-storage-linux/default.nix deleted file mode 100644 index 91a61cb6c603..000000000000 --- a/pkgs/development/compilers/dart/package-overrides/flutter-secure-storage-linux/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ lib -, pkg-config -, libsecret -, jsoncpp -}: - -{ ... }: - -{ nativeBuildInputs ? [ ] -, buildInputs ? [ ] -, ... -}: - -{ - nativeBuildInputs = [ pkg-config ] ++ nativeBuildInputs; - buildInputs = [ libsecret jsoncpp ] ++ buildInputs; -} diff --git a/pkgs/development/compilers/dart/package-overrides/handy-window/default.nix b/pkgs/development/compilers/dart/package-overrides/handy-window/default.nix deleted file mode 100644 index 49b5d47487e8..000000000000 --- a/pkgs/development/compilers/dart/package-overrides/handy-window/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ lib -, cairo -, fribidi -}: - -{ ... }: - -{ CFLAGS ? "" -, ... -}: - -{ - CFLAGS = "${CFLAGS} -isystem ${lib.getOutput "dev" fribidi}/include/fribidi -isystem ${lib.getOutput "dev" cairo}/include"; -} diff --git a/pkgs/development/compilers/dart/package-overrides/matrix/default.nix b/pkgs/development/compilers/dart/package-overrides/matrix/default.nix deleted file mode 100644 index fb1adafa3208..000000000000 --- a/pkgs/development/compilers/dart/package-overrides/matrix/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ openssl -}: - -{ ... }: - -{ runtimeDependencies ? [ ] -, ... -}: - -{ - runtimeDependencies = runtimeDependencies ++ [ openssl ]; -} diff --git a/pkgs/development/compilers/dart/package-overrides/olm/default.nix b/pkgs/development/compilers/dart/package-overrides/olm/default.nix deleted file mode 100644 index e91e8f393ca7..000000000000 --- a/pkgs/development/compilers/dart/package-overrides/olm/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ olm -}: - -{ ... }: - -{ runtimeDependencies ? [ ] -, ... -}: - -{ - runtimeDependencies = runtimeDependencies ++ [ olm ]; -} diff --git a/pkgs/development/compilers/dart/package-overrides/system-tray/default.nix b/pkgs/development/compilers/dart/package-overrides/system-tray/default.nix deleted file mode 100644 index 531d833a6998..000000000000 --- a/pkgs/development/compilers/dart/package-overrides/system-tray/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ libayatana-appindicator -}: - -{ ... }: - -{ preBuild ? "" -, ... -}: - -{ - preBuild = preBuild + '' - # $PUB_CACHE/hosted is a symlink to a store path. - mv $PUB_CACHE/hosted $PUB_CACHE/hosted_copy - cp -HR $PUB_CACHE/hosted_copy $PUB_CACHE/hosted - substituteInPlace $PUB_CACHE/hosted/pub.dev/system_tray-*/linux/tray.cc \ - --replace "libappindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1" - ''; -} diff --git a/pkgs/development/compilers/dart/package-overrides/default.nix b/pkgs/development/compilers/dart/package-source-builders/default.nix index e015d423a1ca..e015d423a1ca 100644 --- a/pkgs/development/compilers/dart/package-overrides/default.nix +++ b/pkgs/development/compilers/dart/package-source-builders/default.nix diff --git a/pkgs/development/compilers/dart/package-source-builders/flutter-secure-storage-linux/default.nix b/pkgs/development/compilers/dart/package-source-builders/flutter-secure-storage-linux/default.nix new file mode 100644 index 000000000000..c111a7364656 --- /dev/null +++ b/pkgs/development/compilers/dart/package-source-builders/flutter-secure-storage-linux/default.nix @@ -0,0 +1,23 @@ +{ stdenv +, libsecret +, jsoncpp +}: + +{ version, src, ... }: + +stdenv.mkDerivation { + pname = "flutter-secure-storage-linux"; + inherit version src; + inherit (src) passthru; + + propagatedBuildInputs = [ libsecret jsoncpp ]; + + installPhase = '' + runHook preInstall + + mkdir -p "$out" + ln -s '${src}'/* "$out" + + runHook postInstall + ''; +} diff --git a/pkgs/development/compilers/dart/package-source-builders/handy-window/default.nix b/pkgs/development/compilers/dart/package-source-builders/handy-window/default.nix new file mode 100644 index 000000000000..bd43e0ed947f --- /dev/null +++ b/pkgs/development/compilers/dart/package-source-builders/handy-window/default.nix @@ -0,0 +1,31 @@ +{ stdenv +, lib +, writeScript +, cairo +, fribidi +}: + +{ version, src, ... }: + +stdenv.mkDerivation rec { + pname = "handy-window"; + inherit version src; + inherit (src) passthru; + + setupHook = writeScript "${pname}-setup-hook" '' + handyWindowConfigureHook() { + export CFLAGS="$CFLAGS -isystem ${lib.getDev fribidi}/include/fribidi -isystem ${lib.getDev cairo}/include" + } + + postConfigureHooks+=(handyWindowConfigureHook) + ''; + + installPhase = '' + runHook preInstall + + mkdir -p "$out" + ln -s '${src}'/* "$out" + + runHook postInstall + ''; +} diff --git a/pkgs/development/compilers/dart/package-source-builders/matrix/default.nix b/pkgs/development/compilers/dart/package-source-builders/matrix/default.nix new file mode 100644 index 000000000000..1e2c3fea80e7 --- /dev/null +++ b/pkgs/development/compilers/dart/package-source-builders/matrix/default.nix @@ -0,0 +1,30 @@ +{ stdenv +, lib +, writeScript +, openssl +}: + +{ version, src, ... }: + +stdenv.mkDerivation rec { + pname = "matrix"; + inherit version src; + inherit (src) passthru; + + setupHook = writeScript "${pname}-setup-hook" '' + matrixFixupHook() { + runtimeDependencies+=('${lib.getLib openssl}') + } + + preFixupHooks+=(matrixFixupHook) + ''; + + installPhase = '' + runHook preInstall + + mkdir -p "$out" + ln -s '${src}'/* "$out" + + runHook postInstall + ''; +} diff --git a/pkgs/development/compilers/dart/package-source-builders/olm/default.nix b/pkgs/development/compilers/dart/package-source-builders/olm/default.nix new file mode 100644 index 000000000000..8d715ff190fc --- /dev/null +++ b/pkgs/development/compilers/dart/package-source-builders/olm/default.nix @@ -0,0 +1,30 @@ +{ stdenv +, lib +, writeScript +, olm +}: + +{ version, src, ... }: + +stdenv.mkDerivation rec { + pname = "olm"; + inherit version src; + inherit (src) passthru; + + setupHook = writeScript "${pname}-setup-hook" '' + olmFixupHook() { + runtimeDependencies+=('${lib.getLib olm}') + } + + preFixupHooks+=(olmFixupHook) + ''; + + installPhase = '' + runHook preInstall + + mkdir -p "$out" + ln -s '${src}'/* "$out" + + runHook postInstall + ''; +} diff --git a/pkgs/development/compilers/dart/package-source-builders/system-tray/default.nix b/pkgs/development/compilers/dart/package-source-builders/system-tray/default.nix new file mode 100644 index 000000000000..81dc88ab2f52 --- /dev/null +++ b/pkgs/development/compilers/dart/package-source-builders/system-tray/default.nix @@ -0,0 +1,22 @@ +{ stdenv +, libayatana-appindicator +}: + +{ version, src, ... }: + +stdenv.mkDerivation rec { + pname = "system-tray"; + inherit version src; + inherit (src) passthru; + + installPhase = '' + runHook preInstall + + mkdir -p "$out" + cp -r '${src}'/* "$out" + substituteInPlace "$out/linux/tray.cc" \ + --replace "libappindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1" + + runHook postInstall + ''; +} |