mirror of
https://github.com/winapps-org/winapps.git
synced 2025-08-06 02:38:26 +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
|
||||
# specify to use binary cache (optional)
|
||||
extra-substituters = https://winapps.cachix.org/
|
||||
extra-trusted-public-keys = winapps.cachix.org-1:HI82jWrXZsQRar/PChgIx1unmuEsiQMQq+zt05CD36g=
|
||||
extra-substituters = https://cache.garnix.io/
|
||||
extra-trusted-public-keys = cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=
|
||||
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)
|
||||
nix.settings = {
|
||||
substituters = [ "https://winapps.cachix.org/" ];
|
||||
trusted-public-keys = [ "winapps.cachix.org-1:HI82jWrXZsQRar/PChgIx1unmuEsiQMQq+zt05CD36g=" ];
|
||||
substituters = [ "https://cache.garnix.io/" ];
|
||||
trusted-public-keys = [ "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" ];
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
|
22
flake.lock
generated
22
flake.lock
generated
@@ -32,13 +32,28 @@
|
||||
"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": {
|
||||
"locked": {
|
||||
"lastModified": 1724819573,
|
||||
"narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=",
|
||||
"lastModified": 1751984180,
|
||||
"narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "71e91c409d1e654808b2621f28a327acfdad8dc2",
|
||||
"rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -52,6 +67,7 @@
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils",
|
||||
"nix-filter": "nix-filter",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
|
16
flake.nix
16
flake.nix
@@ -1,17 +1,29 @@
|
||||
{
|
||||
description = "WinApps Nix packages & NixOS module";
|
||||
description = "WinApps Nix packages";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
|
||||
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 =
|
||||
{
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
nix-filter,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
@@ -22,7 +34,7 @@
|
||||
{
|
||||
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 { };
|
||||
}
|
||||
);
|
||||
|
@@ -1,33 +1,35 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
freerdp3,
|
||||
freerdp,
|
||||
dialog,
|
||||
libnotify,
|
||||
netcat,
|
||||
iproute2,
|
||||
writeShellScriptBin,
|
||||
nix-filter ? throw "Pass github:numtide/nix-filter as an argument!",
|
||||
...
|
||||
}:
|
||||
let
|
||||
rev = "ce9a84dc5294c45a4b69847f5164628f7d6a4ae1";
|
||||
hash = "sha256-SsyJy9mCwBjKex8mfCnKrzKUM/+xws0EltI2aSkKTuM=";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "winapps";
|
||||
version = "0-unstable-2025-07-02";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "winapps-org";
|
||||
repo = "winapps";
|
||||
|
||||
inherit rev hash;
|
||||
src = nix-filter {
|
||||
root = ./../..;
|
||||
include = [
|
||||
"apps"
|
||||
"install"
|
||||
"bin"
|
||||
"LICENSE.md"
|
||||
"COPYRIGHT.md"
|
||||
"setup.sh"
|
||||
];
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [
|
||||
freerdp3
|
||||
(writeShellScriptBin "xfreerdp3" ''${lib.getExe' freerdp "xfreerdp"} "$@"'')
|
||||
libnotify
|
||||
dialog
|
||||
netcat
|
||||
|
Reference in New Issue
Block a user