mirror of
https://github.com/winapps-org/winapps.git
synced 2025-08-06 18:58:27 +02:00
feat: use garnix
This commit is contained in:
40
.github/workflows/update-nix.yaml
vendored
40
.github/workflows/update-nix.yaml
vendored
@@ -1,40 +0,0 @@
|
|||||||
name: "Update Flake Packages"
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
types: [labeled]
|
|
||||||
schedule:
|
|
||||||
- cron: "0 10 * * 0" # https://crontab.guru/#0_10_*_*_0
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'rebuild nix')
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Nix
|
|
||||||
uses: DeterminateSystems/nix-installer-action@main
|
|
||||||
with:
|
|
||||||
trust-runner-user: true
|
|
||||||
|
|
||||||
- name: Set up cache
|
|
||||||
uses: cachix/cachix-action@v15
|
|
||||||
with:
|
|
||||||
name: winapps
|
|
||||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
|
||||||
|
|
||||||
- name: Update flake packages
|
|
||||||
uses: winapps-org/nix-update-action@v1.4.0
|
|
||||||
with:
|
|
||||||
extra-args: --version=branch
|
|
||||||
skip-pr: "${{ github.event_name == 'pull_request' }}"
|
|
||||||
|
|
||||||
- name: Build packages
|
|
||||||
run: nix build .#winapps .#winapps-launcher
|
|
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
/.idea
|
||||||
|
/.vscode
|
||||||
|
/result
|
||||||
|
|
@@ -590,8 +590,8 @@ In your `~/.config/nix/nix.conf`:
|
|||||||
```
|
```
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
# specify to use binary cache (optional)
|
# specify to use binary cache (optional)
|
||||||
extra-substituters = https://winapps.cachix.org/
|
extra-substituters = https://cache.garnix.io/
|
||||||
extra-trusted-public-keys = winapps.cachix.org-1:HI82jWrXZsQRar/PChgIx1unmuEsiQMQq+zt05CD36g=
|
extra-trusted-public-keys = cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=
|
||||||
extra-trusted-users = <your-username> # replace with your username
|
extra-trusted-users = <your-username> # replace with your username
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -641,8 +641,8 @@ nix profile install github:winapps-org/winapps#winapps-launcher # optional
|
|||||||
{
|
{
|
||||||
# set up binary cache (optional)
|
# set up binary cache (optional)
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
substituters = [ "https://winapps.cachix.org/" ];
|
substituters = [ "https://cache.garnix.io/" ];
|
||||||
trusted-public-keys = [ "winapps.cachix.org-1:HI82jWrXZsQRar/PChgIx1unmuEsiQMQq+zt05CD36g=" ];
|
trusted-public-keys = [ "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
|
22
flake.lock
generated
22
flake.lock
generated
@@ -32,13 +32,28 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-filter": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533336,
|
||||||
|
"narHash": "sha256-oRam5PS1vcrr5UPgALW0eo1m/5/pls27Z/pabHNy2Ms=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "nix-filter",
|
||||||
|
"rev": "f7653272fd234696ae94229839a99b73c9ab7de0",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "nix-filter",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1724819573,
|
"lastModified": 1751984180,
|
||||||
"narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=",
|
"narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "71e91c409d1e654808b2621f28a327acfdad8dc2",
|
"rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -52,6 +67,7 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
|
"nix-filter": "nix-filter",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
16
flake.nix
16
flake.nix
@@ -1,17 +1,29 @@
|
|||||||
{
|
{
|
||||||
description = "WinApps Nix packages & NixOS module";
|
description = "WinApps Nix packages";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
|
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
nix-filter.url = "github:numtide/nix-filter";
|
||||||
|
};
|
||||||
|
|
||||||
|
nixConfig = {
|
||||||
|
extra-substituters = [
|
||||||
|
"https://cache.garnix.io"
|
||||||
|
];
|
||||||
|
|
||||||
|
extra-trusted-public-keys = [
|
||||||
|
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{
|
{
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
flake-utils,
|
flake-utils,
|
||||||
|
nix-filter,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
flake-utils.lib.eachDefaultSystem (
|
flake-utils.lib.eachDefaultSystem (
|
||||||
@@ -22,7 +34,7 @@
|
|||||||
{
|
{
|
||||||
formatter = pkgs.nixfmt-rfc-style;
|
formatter = pkgs.nixfmt-rfc-style;
|
||||||
|
|
||||||
packages.winapps = pkgs.callPackage ./packages/winapps { };
|
packages.winapps = pkgs.callPackage ./packages/winapps { inherit nix-filter; };
|
||||||
packages.winapps-launcher = pkgs.callPackage ./packages/winapps-launcher { };
|
packages.winapps-launcher = pkgs.callPackage ./packages/winapps-launcher { };
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@@ -1,33 +1,35 @@
|
|||||||
{
|
{
|
||||||
stdenv,
|
stdenv,
|
||||||
lib,
|
lib,
|
||||||
fetchFromGitHub,
|
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
freerdp3,
|
freerdp,
|
||||||
dialog,
|
dialog,
|
||||||
libnotify,
|
libnotify,
|
||||||
netcat,
|
netcat,
|
||||||
iproute2,
|
iproute2,
|
||||||
|
writeShellScriptBin,
|
||||||
|
nix-filter ? throw "Pass github:numtide/nix-filter as an argument!",
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
rev = "ce9a84dc5294c45a4b69847f5164628f7d6a4ae1";
|
|
||||||
hash = "sha256-SsyJy9mCwBjKex8mfCnKrzKUM/+xws0EltI2aSkKTuM=";
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "winapps";
|
pname = "winapps";
|
||||||
version = "0-unstable-2025-07-02";
|
version = "0-unstable-2025-07-02";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = nix-filter {
|
||||||
owner = "winapps-org";
|
root = ./../..;
|
||||||
repo = "winapps";
|
include = [
|
||||||
|
"apps"
|
||||||
inherit rev hash;
|
"install"
|
||||||
|
"bin"
|
||||||
|
"LICENSE.md"
|
||||||
|
"COPYRIGHT.md"
|
||||||
|
"setup.sh"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
freerdp3
|
(writeShellScriptBin "xfreerdp3" ''${lib.getExe' freerdp "xfreerdp"} "$@"'')
|
||||||
libnotify
|
libnotify
|
||||||
dialog
|
dialog
|
||||||
netcat
|
netcat
|
||||||
|
Reference in New Issue
Block a user