mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-04-06 22:02:01 +02:00
Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
|
f229ed7dea | ||
|
f09ed75581 |
|
@ -1 +1 @@
|
|||
flake-profile-11-link
|
||||
flake-profile-4-link
|
|
@ -1 +0,0 @@
|
|||
/nix/store/51yb1yhqssknlmxvvscvj0cqbvs0z915-nix-shell-env
|
1
.direnv/flake-profile-4-link
Symbolic link
1
.direnv/flake-profile-4-link
Symbolic link
|
@ -0,0 +1 @@
|
|||
/nix/store/30prmd5nyydss0bcs7d578grjav6i7x3-nix-shell-env
|
42
.github/workflows/rust.yml
vendored
42
.github/workflows/rust.yml
vendored
|
@ -1,25 +1,33 @@
|
|||
name: Rust
|
||||
|
||||
# inspired by https://github.com/danth/stylix/blob/master/.github/workflows/docs.yml
|
||||
name: Rust-build
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
branches: ["main"]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: [self-hosted, ubuntu]
|
||||
name: Build
|
||||
permissions:
|
||||
contents: read
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: nightly-rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@main
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: nightly
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
extra-conf: |
|
||||
extra-experimental-features = nix-command flakes
|
||||
- name: Set up cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: action
|
||||
uses: cachix/install-nix-action@v25
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- name: cache
|
||||
uses: cachix/cachix-action@v14
|
||||
with:
|
||||
name: reset
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
- name: Run clippy
|
||||
run: cargo clippy --fix
|
||||
run: nix -L build github:${{ github.repository }}/${{ github.sha }} --no-write-lock-file
|
||||
|
|
58
flake.lock
58
flake.lock
|
@ -7,11 +7,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1715865404,
|
||||
"narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=",
|
||||
"lastModified": 1738453229,
|
||||
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9",
|
||||
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -20,31 +20,13 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705309234,
|
||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1716137900,
|
||||
"narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=",
|
||||
"lastModified": 1739446958,
|
||||
"narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1",
|
||||
"rev": "2ff53fe64443980e139eaa286017f53f88336dd0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -56,11 +38,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1706487304,
|
||||
"narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=",
|
||||
"lastModified": 1736320768,
|
||||
"narHash": "sha256-nIYdTAiKIGnFNugbomgBJR+Xv5F1ZQU+HfaBqJKroC0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "90f456026d284c22b3e3497be980b2e47d0b28ac",
|
||||
"rev": "4bc9c909d9ac828a039f288cf872d16d38185db8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -79,15 +61,14 @@
|
|||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716171463,
|
||||
"narHash": "sha256-lc7wOh5BjYUoxdhcPkeUY8BmuL2qtRaHlW1403RW48E=",
|
||||
"lastModified": 1739586408,
|
||||
"narHash": "sha256-UN9hRKRE1eLU8C0cioTZubaCZQTA8NDc8/4vCpS5pS0=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "04d61d14803854fd8453ec43c5c53a471e5407a8",
|
||||
"rev": "3dbc0ce1c0690b83cfb9a9a51fbe90c3bc8f9916",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -95,21 +76,6 @@
|
|||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
118
nix/default.nix
118
nix/default.nix
|
@ -1,69 +1,69 @@
|
|||
{ rustPlatform
|
||||
, rust-bin
|
||||
, pulseaudio
|
||||
, dbus
|
||||
, gdk-pixbuf
|
||||
, gnome
|
||||
, pkg-config
|
||||
, wrapGAppsHook4
|
||||
, gtk4
|
||||
, libadwaita
|
||||
, python312Packages
|
||||
, flatpak
|
||||
, flatpak-builder
|
||||
, lib
|
||||
, lockFile
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
{
|
||||
rustPlatform,
|
||||
rust-bin,
|
||||
pulseaudio,
|
||||
dbus,
|
||||
gdk-pixbuf,
|
||||
adwaita-icon-theme,
|
||||
pkg-config,
|
||||
wrapGAppsHook4,
|
||||
gtk4,
|
||||
libadwaita,
|
||||
python312Packages,
|
||||
flatpak,
|
||||
flatpak-builder,
|
||||
lib,
|
||||
lockFile,
|
||||
...
|
||||
}: let
|
||||
cargoToml = builtins.fromTOML (builtins.readFile ../Cargo.toml);
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "ReSet";
|
||||
version = cargoToml.package.version;
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "ReSet";
|
||||
version = cargoToml.package.version;
|
||||
|
||||
src = ../.;
|
||||
src = ../.;
|
||||
|
||||
buildInputs = [
|
||||
gtk4
|
||||
libadwaita
|
||||
pulseaudio
|
||||
dbus
|
||||
gdk-pixbuf
|
||||
gnome.adwaita-icon-theme
|
||||
python312Packages.aiohttp
|
||||
python312Packages.toml
|
||||
flatpak
|
||||
flatpak-builder
|
||||
];
|
||||
buildInputs = [
|
||||
gtk4
|
||||
libadwaita
|
||||
pulseaudio
|
||||
dbus
|
||||
gdk-pixbuf
|
||||
adwaita-icon-theme
|
||||
python312Packages.aiohttp
|
||||
python312Packages.toml
|
||||
flatpak
|
||||
flatpak-builder
|
||||
];
|
||||
|
||||
cargoLock = {
|
||||
inherit lockFile;
|
||||
};
|
||||
cargoLock = {
|
||||
inherit lockFile;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
wrapGAppsHook4
|
||||
rust-bin.nightly."2024-05-10".default
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
wrapGAppsHook4
|
||||
rust-bin.nightly."2024-05-10".default
|
||||
];
|
||||
|
||||
copyLibs = true;
|
||||
copyLibs = true;
|
||||
|
||||
postInstall = ''
|
||||
install -D --mode=444 $src/${pname}.desktop $out/share/applications/${pname}.desktop
|
||||
install -D --mode=444 $src/src/resources/icons/${pname}.svg $out/share/pixmaps/${pname}.svg
|
||||
'';
|
||||
postInstall = ''
|
||||
install -D --mode=444 $src/${pname}.desktop $out/share/applications/${pname}.desktop
|
||||
install -D --mode=444 $src/src/resources/icons/${pname}.svg $out/share/pixmaps/${pname}.svg
|
||||
'';
|
||||
|
||||
# test is broken in nix for some reason
|
||||
doInstallCheck = false;
|
||||
doCheck = false;
|
||||
# test is broken in nix for some reason
|
||||
doInstallCheck = false;
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A wip universal Linux settings application.";
|
||||
homepage = "https://github.com/Xetibo/ReSet";
|
||||
changelog = "https://github.com/Xetibo/ReSet/releases/tag/${version}";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ DashieTM ];
|
||||
mainProgram = "ReSet";
|
||||
};
|
||||
}
|
||||
meta = with lib; {
|
||||
description = "A wip universal Linux settings application.";
|
||||
homepage = "https://github.com/Xetibo/ReSet";
|
||||
changelog = "https://github.com/Xetibo/ReSet/releases/tag/${version}";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [DashieTM];
|
||||
mainProgram = "ReSet";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue