Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into staging-next
Browse files Browse the repository at this point in the history
  • Loading branch information
K900 committed Feb 5, 2025
2 parents 7099915 + 1036806 commit 6655e04
Show file tree
Hide file tree
Showing 17 changed files with 278 additions and 291 deletions.
26 changes: 0 additions & 26 deletions pkgs/applications/backup/timeshift/timeshift-launcher.patch

This file was deleted.

19 changes: 11 additions & 8 deletions pkgs/applications/backup/timeshift/unwrapped.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,20 @@ stdenv.mkDerivation rec {
hash = "sha256-umMekxP9bvV01KzfIh2Zxa9Xb+tR5x+tG9dOnBIOkjY=";
};

patches = [
./timeshift-launcher.patch
];

postPatch = ''
while IFS="" read -r -d $'\0' FILE; do
for FILE in src/Core/Main.vala src/Utility/Device.vala; do
substituteInPlace "$FILE" \
--replace "/sbin/blkid" "${util-linux}/bin/blkid"
done < <(find ./src -mindepth 1 -name "*.vala" -type f -print0)
--replace-fail "/sbin/blkid" "${lib.getExe' util-linux "blkid"}"
done
substituteInPlace ./src/Utility/IconManager.vala \
--replace "/usr/share" "$out/share"
--replace-fail "/usr/share" "$out/share"
# Substitute app_command to look for the `timeshift-gtk` in $out.
# Substitute the `pkexec ...` as a hack to run a GUI application like Timeshift as root without setting up the corresponding pkexec policy.
substituteInPlace ./src/timeshift-launcher \
--replace-fail "app_command='timeshift-gtk'" "app_command=$out/bin/timeshift-gtk" \
--replace-fail ${lib.escapeShellArg ''pkexec ''${app_command}''} ${lib.escapeShellArg ''pkexec env DISPLAY="$DISPLAY" XAUTHORITY="$XAUTHORITY" "''${app_command}"''}
'';

nativeBuildInputs = [
Expand Down
5 changes: 5 additions & 0 deletions pkgs/applications/backup/timeshift/wrapper.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ stdenvNoCC.mkDerivation {
)
wrapProgram "$out/bin/timeshift" "''${makeWrapperArgs[@]}"
wrapProgram "$out/bin/timeshift-gtk" "''${gappsWrapperArgs[@]}"
# Substitute app_command to look for the `timeshift-gtk` in $out.
unlink "$out/bin/timeshift-launcher"
substitute ${lib.getExe' timeshift-unwrapped "timeshift-launcher"} "$out/bin/timeshift-launcher" \
--replace-fail "app_command=${lib.getExe' timeshift-unwrapped "timeshift-gtk"}" "app_command=$out/bin/timeshift-gtk"
chmod +x "$out/bin/timeshift-launcher"
'';

inherit (timeshift-unwrapped) meta;
Expand Down
6 changes: 3 additions & 3 deletions pkgs/by-name/ch/choose-gui/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
stdenv,
fetchFromGitHub,
xcbuild,
darwin,
apple-sdk_11,
}:

stdenv.mkDerivation rec {
Expand All @@ -19,11 +19,11 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [ xcbuild ];

buildInputs = [ darwin.apple_sdk.frameworks.Cocoa ];
buildInputs = [ apple-sdk_11 ];

buildPhase = ''
runHook preBuild
xcodebuild -arch ${stdenv.hostPlatform.darwinArch} -configuration Release SYMROOT="./output" build
xcodebuild -configuration Release SYMROOT="./output" HOME="$(mktemp -d)" build
cp ./output/Release/choose choose
runHook postBuild
'';
Expand Down
48 changes: 32 additions & 16 deletions pkgs/by-name/rm/rmfakecloud/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,52 @@
lib,
fetchFromGitHub,
buildGoModule,
callPackage,
enableWebui ? true,
pnpm_9,
nodejs,
nixosTests,
}:

buildGoModule rec {
pname = "rmfakecloud";
version = "0.0.21";
version = "0.0.23";

src = fetchFromGitHub {
owner = "ddvk";
repo = pname;
repo = "rmfakecloud";
rev = "v${version}";
hash = "sha256-Opx39FUo4Kzezi96D9iraA8gkqCPVfMf4LhxtVpsuNQ=";
hash = "sha256-XlKqh6GKGreWLPjS8XfEUJCMMxiOw8pP2qX8otD+RCo=";
};

vendorHash = "sha256-9tfxE03brUvCYusmewiqNpCkKyIS9qePqylrzDWrJLY=";

ui = callPackage ./webui.nix { inherit version src; };

postPatch =
if enableWebui then
''
mkdir -p ui/build
cp -r ${ui}/* ui/build
''
else
''
sed -i '/go:/d' ui/assets.go
'';
# if using webUI build it
# use env because of https://github.com/NixOS/nixpkgs/issues/358844
env.pnpmRoot = "ui";
env.pnpmDeps = pnpm_9.fetchDeps {
inherit pname version src;
sourceRoot = "${src.name}/ui";
pnpmLock = "${src}/ui/pnpm-lock.yaml";
hash = "sha256-VNmCT4um2W2ii8jAm+KjQSjixYEKoZkw7CeRwErff/o=";
};
preBuild = lib.optionals enableWebui ''
# using sass-embedded fails at executing node_modules/sass-embedded-linux-x64/dart-sass/src/dart
rm -r ui/node_modules/sass-embedded ui/node_modules/.pnpm/sass-embedded*
# avoid re-running pnpm i...
touch ui/pnpm-lock.yaml
make ui/dist
'';
nativeBuildInputs = lib.optionals enableWebui [
nodejs
pnpm_9.configHook
];

# ... or don't embed it in the server
postPatch = lib.optionals (!enableWebui) ''
sed -i '/go:/d' ui/assets.go
'';

ldflags = [
"-s"
Expand Down
37 changes: 0 additions & 37 deletions pkgs/by-name/rm/rmfakecloud/webui.nix

This file was deleted.

16 changes: 10 additions & 6 deletions pkgs/by-name/up/upbound/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
let
inherit (stdenvNoCC.hostPlatform) system;
sources =
if "${version-channel}" == "main" then import ./sources-main.nix else import ./sources-stable.nix;
if "${version-channel}" == "main" then
lib.importJSON ./sources-main.json
else
lib.importJSON ./sources-stable.json;
arch = sources.archMap.${system};

in
Expand All @@ -18,13 +21,13 @@ stdenvNoCC.mkDerivation {
version = sources.version;
srcs = [
(fetchurl {
url = sources.fetchurlAttrSet.${system}.docker-credential-up.url;
sha256 = sources.fetchurlAttrSet.${system}.docker-credential-up.hash;
url = sources.fetchurlAttrSet.docker-credential-up.${system}.url;
sha256 = sources.fetchurlAttrSet.docker-credential-up.${system}.hash;
})

(fetchurl {
url = sources.fetchurlAttrSet.${system}.up.url;
sha256 = sources.fetchurlAttrSet.${system}.up.hash;
url = sources.fetchurlAttrSet.up.${system}.url;
sha256 = sources.fetchurlAttrSet.up.${system}.hash;
})
];

Expand Down Expand Up @@ -63,12 +66,13 @@ stdenvNoCC.mkDerivation {
doCheck = false;

passthru.updateScript = [
./update.sh
./update
"${version-channel}"
];

meta = {
description = "CLI for interacting with Upbound Cloud, Upbound Enterprise, and Universal Crossplane (UXP)";
changelog = "https://docs.upbound.io/reference/cli/rel-notes/#whats-changed";
homepage = "https://upbound.io";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [
Expand Down
53 changes: 53 additions & 0 deletions pkgs/by-name/up/upbound/sources-main.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"archMap": {
"aarch64-darwin": "darwin_arm64",
"aarch64-linux": "linux_arm64",
"x86_64-darwin": "darwin_amd64",
"x86_64-linux": "linux_amd64"
},
"fetchurlAttrSet": {
"docker-credential-up": {
"aarch64-darwin": {
"hash": "sha256-3fx/wjBoFxmeo55QbRw9cl4GFCFehGpZeVAw1bvooSk=",
"url": "https://cli.upbound.io/main/v0.38.0-0.rc.0.29.g59359e0/bundle/docker-credential-up/darwin_arm64.tar.gz"
},
"aarch64-linux": {
"hash": "sha256-FeF7D8WLpK8S6b7QCLaOI7Dm2EzbDqJVp9tfh13BJuU=",
"url": "https://cli.upbound.io/main/v0.38.0-0.rc.0.29.g59359e0/bundle/docker-credential-up/linux_arm64.tar.gz"
},
"x86_64-darwin": {
"hash": "sha256-00y9wGMwu5ZsTzlNkSvdwEse5eV4xzLiwQjgSTnmW5w=",
"url": "https://cli.upbound.io/main/v0.38.0-0.rc.0.29.g59359e0/bundle/docker-credential-up/darwin_amd64.tar.gz"
},
"x86_64-linux": {
"hash": "sha256-oObO/T/2yOFDaNVJGQCqna130Tyx/sEOCAQMDYhVlNI=",
"url": "https://cli.upbound.io/main/v0.38.0-0.rc.0.29.g59359e0/bundle/docker-credential-up/linux_amd64.tar.gz"
}
},
"up": {
"aarch64-darwin": {
"hash": "sha256-Bf6O6rsth3D5h5olxqHxULuxxPtNhxP+gN69mJnlQTg=",
"url": "https://cli.upbound.io/main/v0.38.0-0.rc.0.29.g59359e0/bundle/up/darwin_arm64.tar.gz"
},
"aarch64-linux": {
"hash": "sha256-svTHCjw2ZrTEscNpizOmg9leQAbzhWcPfst3nMUhUXg=",
"url": "https://cli.upbound.io/main/v0.38.0-0.rc.0.29.g59359e0/bundle/up/linux_arm64.tar.gz"
},
"x86_64-darwin": {
"hash": "sha256-1LxqRHQjNlRFTGhEyOR9uW407LkqdpVjB3w57hNT/Zk=",
"url": "https://cli.upbound.io/main/v0.38.0-0.rc.0.29.g59359e0/bundle/up/darwin_amd64.tar.gz"
},
"x86_64-linux": {
"hash": "sha256-ZLjhD7uCpBURYozX1IjUTJDzPuKFedIZQhRvMqMMsLY=",
"url": "https://cli.upbound.io/main/v0.38.0-0.rc.0.29.g59359e0/bundle/up/linux_amd64.tar.gz"
}
}
},
"platformList": [
"aarch64-darwin",
"aarch64-linux",
"x86_64-darwin",
"x86_64-linux"
],
"version": "0.38.0-0.rc.0.29.g59359e0"
}
54 changes: 0 additions & 54 deletions pkgs/by-name/up/upbound/sources-main.nix

This file was deleted.

Loading

0 comments on commit 6655e04

Please sign in to comment.