yet another ci attempt
This commit is contained in:
parent
7372c4e779
commit
d9072ae7f5
19
.github/workflows/cache.yml
vendored
19
.github/workflows/cache.yml
vendored
@ -11,7 +11,15 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@master
|
||||
with:
|
||||
remove-dotnet: 'true'
|
||||
remove-android: 'true'
|
||||
remove-haskell: 'true'
|
||||
remove-docker-images: 'true'
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Install nix
|
||||
uses: cachix/install-nix-action@v21
|
||||
with:
|
||||
@ -28,6 +36,13 @@ jobs:
|
||||
echo "password ${{ secrets.ATTIC_TOKEN }}" >> /home/runner/.config/nix/netrc
|
||||
nix run github:AtaraxiaSjel/attic#attic -- login dev https://cache.ataraxiadev.com/ ${{ secrets.ATTIC_TOKEN }}
|
||||
- name: Build system
|
||||
run: nix develop .#ci -c nix-build-uncached ci.nix -A buildOutputs
|
||||
run: |
|
||||
export TMPDIR=$(pwd)/build/tmp
|
||||
mkdir -p $TMPDIR
|
||||
nix build --store $(pwd)/build -L .#ivpn-ui
|
||||
# echo 'Build host-workstation'
|
||||
# nix build --out-link result-workstation --store $(pwd)/build .#host-workstation
|
||||
# echo 'Build host-hypervisor'
|
||||
# nix build --out-link result-hypervisor --store $(pwd)/build .#host-hypervisor
|
||||
- name: Push to cache
|
||||
run: nix develop .#ci -c attic push ataraxiadev ./result*
|
||||
|
@ -107,7 +107,7 @@
|
||||
|
||||
sharedPatches = patchesPath [
|
||||
"gitea-208605.patch"
|
||||
"ivpn-ui.patch"
|
||||
# "ivpn-ui.patch"
|
||||
"ivpn.patch"
|
||||
"mullvad-exclude-containers.patch"
|
||||
"vaultwarden.patch"
|
||||
@ -205,6 +205,7 @@
|
||||
# Build the entire system for uploading to attic
|
||||
host-workstation = self.nixosConfigurations."AMD-Workstation".config.system.build.toplevel;
|
||||
host-hypervisor = self.nixosConfigurations."Home-Hypervisor".config.system.build.toplevel;
|
||||
ivpn-ui = pkgs.callPackage ./profiles/packages/ivpn-ui { };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -22,6 +22,7 @@ with lib; {
|
||||
cassowary-py = inputs.cassowary.packages.${system}.cassowary;
|
||||
dhcpcd = prev.dhcpcd.override { enablePrivSep = false; };
|
||||
hoyolab-daily-bot = inputs.hoyolab-daily-bot.packages.${system}.default;
|
||||
ivpn-ui = prev.callPackage ./packages/ivpn-ui { };
|
||||
nix-alien = inputs.nix-alien.packages.${system}.nix-alien;
|
||||
nix-index-update = inputs.nix-alien.packages.${system}.nix-index-update;
|
||||
prismlauncher = inputs.prismlauncher.packages.${system}.default;
|
||||
|
103
profiles/packages/ivpn-ui/default.nix
Normal file
103
profiles/packages/ivpn-ui/default.nix
Normal file
@ -0,0 +1,103 @@
|
||||
{ lib
|
||||
, buildNpmPackage
|
||||
, fetchFromGitHub
|
||||
, nodejs_18
|
||||
, electron_25
|
||||
, jq
|
||||
, makeWrapper
|
||||
, makeDesktopItem
|
||||
, copyDesktopItems
|
||||
, ivpn
|
||||
, openssl
|
||||
, glib
|
||||
}:
|
||||
|
||||
let
|
||||
buildNpmPackage' = buildNpmPackage.override { nodejs = nodejs_18; };
|
||||
electron = electron_25;
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "IVPN";
|
||||
desktopName = "IVPN";
|
||||
comment = "UI interface for IVPN";
|
||||
genericName = "VPN client";
|
||||
exec = "ivpn-ui";
|
||||
icon = "ivpn";
|
||||
type = "Application";
|
||||
startupNotify = true;
|
||||
categories = [ "Network" ];
|
||||
};
|
||||
in buildNpmPackage' rec {
|
||||
pname = "ivpn-ui";
|
||||
version = "3.10.23";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ivpn";
|
||||
repo = "desktop-app";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-0XIATqidCQdERitYys7Gk0bENRZxdb/A9ieBNsWhbUM=";
|
||||
};
|
||||
|
||||
env = {
|
||||
ELECTRON_OVERRIDE_DIST_PATH = "${electron}/bin";
|
||||
ELECTRON_CACHE = ".cache/electron";
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
|
||||
NODE_OPTIONS = "--openssl-legacy-provider";
|
||||
};
|
||||
|
||||
npmBuildScript = "electron:build";
|
||||
npmDepsHash = "sha256-DEXz/IsQG82f1PdlsabtaPKdj8XoweE121sZcqMZvPo=";
|
||||
|
||||
sourceRoot = "source/ui";
|
||||
|
||||
nativeBuildInputs = [
|
||||
jq
|
||||
makeWrapper
|
||||
copyDesktopItems
|
||||
];
|
||||
|
||||
desktopItems = [ desktopItem ];
|
||||
|
||||
# electron-builder attempts to download Electron frow web,
|
||||
# so we need to provide a zipped version of Electron.
|
||||
# The version of Electron that we provide may differ from the one
|
||||
# in the package-lock.json file, but it should not cause any problems.
|
||||
preBuild = ''
|
||||
mkdir -p .cache/electron
|
||||
ln -sf ${electron.src} .cache/electron/electron-v$(jq -r '.devDependencies.electron' package.json)-linux-x64.zip
|
||||
|
||||
substituteInPlace src/daemon-client/index.js \
|
||||
--replace "/usr/bin/gsettings" "${glib}/bin/gsettings" \
|
||||
--replace "/usr/bin/ivpn exclude" "${ivpn}/bin/ivpn exclude"
|
||||
|
||||
substituteInPlace src/helpers/main_platform.js \
|
||||
--replace "/usr/bin/openssl" "${openssl}/bin/openssl"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin $out/opt/ivpn-ui $out/share/icons/hicolor/scalable/apps
|
||||
|
||||
pushd dist_electron/linux-unpacked
|
||||
cp -r locales resources $out/opt/ivpn-ui
|
||||
cp ivpn-ui $out/bin
|
||||
popd
|
||||
|
||||
cp References/Linux/ui/ivpnicon.svg $out/share/icons/hicolor/scalable/apps/ivpn.svg
|
||||
|
||||
makeWrapper '${electron}/bin/electron' "$out/bin/ivpn-ui" \
|
||||
--add-flags $out/opt/ivpn-ui/resources/app.asar \
|
||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Official IVPN Desktop app";
|
||||
homepage = "https://www.ivpn.net/apps";
|
||||
changelog = "https://github.com/ivpn/desktop-app/releases/tag/v${version}";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ ataraxiasjel ];
|
||||
};
|
||||
}
|
@ -54,14 +54,10 @@ in {
|
||||
size = thm.fontSizes.normal.int;
|
||||
};
|
||||
gtk3.extraConfig = {
|
||||
Settings = ''
|
||||
gtk-application-prefer-dark-theme=1
|
||||
'';
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
gtk4.extraConfig = {
|
||||
Settings = ''
|
||||
gtk-application-prefer-dark-theme=1
|
||||
'';
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
};
|
||||
# home.sessionVariables.GTK_THEME = "Generated";
|
||||
|
Loading…
x
Reference in New Issue
Block a user