Compare commits

..

No commits in common. "main" and "2.0.0" have entirely different histories.
main ... 2.0.0

6 changed files with 124 additions and 98 deletions

View file

@ -1 +1 @@
flake-profile-4-link flake-profile-11-link

View file

@ -0,0 +1 @@
/nix/store/51yb1yhqssknlmxvvscvj0cqbvs0z915-nix-shell-env

View file

@ -1 +0,0 @@
/nix/store/30prmd5nyydss0bcs7d578grjav6i7x3-nix-shell-env

View file

@ -1,33 +1,25 @@
# inspired by https://github.com/danth/stylix/blob/master/.github/workflows/docs.yml name: Rust
name: Rust-build
on: on:
push: push:
branches: ["main"] branches: [ "main" ]
pull_request: pull_request:
branches: ["main"] branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs: jobs:
build: build:
name: Build runs-on: [self-hosted, ubuntu]
permissions:
contents: read
runs-on: ubuntu-latest
steps: steps:
- name: Install Nix - uses: actions/checkout@v3
uses: DeterminateSystems/nix-installer-action@main - name: nightly-rust
uses: actions-rs/toolchain@v1
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} profile: minimal
extra-conf: | toolchain: nightly
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 - name: Build
run: nix -L build github:${{ github.repository }}/${{ github.sha }} --no-write-lock-file run: cargo build --verbose
- name: Run clippy
run: cargo clippy --fix

View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1738453229, "lastModified": 1715865404,
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -20,13 +20,31 @@
"type": "github" "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1739446958, "lastModified": 1716137900,
"narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=", "narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2ff53fe64443980e139eaa286017f53f88336dd0", "rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -38,11 +56,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1736320768, "lastModified": 1706487304,
"narHash": "sha256-nIYdTAiKIGnFNugbomgBJR+Xv5F1ZQU+HfaBqJKroC0=", "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4bc9c909d9ac828a039f288cf872d16d38185db8", "rev": "90f456026d284c22b3e3497be980b2e47d0b28ac",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -61,14 +79,15 @@
}, },
"rust-overlay": { "rust-overlay": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1739586408, "lastModified": 1716171463,
"narHash": "sha256-UN9hRKRE1eLU8C0cioTZubaCZQTA8NDc8/4vCpS5pS0=", "narHash": "sha256-lc7wOh5BjYUoxdhcPkeUY8BmuL2qtRaHlW1403RW48E=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "3dbc0ce1c0690b83cfb9a9a51fbe90c3bc8f9916", "rev": "04d61d14803854fd8453ec43c5c53a471e5407a8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -76,6 +95,21 @@
"repo": "rust-overlay", "repo": "rust-overlay",
"type": "github" "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", "root": "root",

View file

@ -1,69 +1,69 @@
{ { rustPlatform
rustPlatform, , rust-bin
rust-bin, , pulseaudio
pulseaudio, , dbus
dbus, , gdk-pixbuf
gdk-pixbuf, , gnome
adwaita-icon-theme, , pkg-config
pkg-config, , wrapGAppsHook4
wrapGAppsHook4, , gtk4
gtk4, , libadwaita
libadwaita, , python312Packages
python312Packages, , flatpak
flatpak, , flatpak-builder
flatpak-builder, , lib
lib, , lockFile
lockFile, , ...
... }:
}: let let
cargoToml = builtins.fromTOML (builtins.readFile ../Cargo.toml); cargoToml = builtins.fromTOML (builtins.readFile ../Cargo.toml);
in in
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "ReSet"; pname = "ReSet";
version = cargoToml.package.version; version = cargoToml.package.version;
src = ../.; src = ../.;
buildInputs = [ buildInputs = [
gtk4 gtk4
libadwaita libadwaita
pulseaudio pulseaudio
dbus dbus
gdk-pixbuf gdk-pixbuf
adwaita-icon-theme gnome.adwaita-icon-theme
python312Packages.aiohttp python312Packages.aiohttp
python312Packages.toml python312Packages.toml
flatpak flatpak
flatpak-builder flatpak-builder
]; ];
cargoLock = { cargoLock = {
inherit lockFile; inherit lockFile;
}; };
nativeBuildInputs = [ nativeBuildInputs = [
pkg-config pkg-config
wrapGAppsHook4 wrapGAppsHook4
rust-bin.nightly."2024-05-10".default rust-bin.nightly."2024-05-10".default
]; ];
copyLibs = true; copyLibs = true;
postInstall = '' postInstall = ''
install -D --mode=444 $src/${pname}.desktop $out/share/applications/${pname}.desktop 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 install -D --mode=444 $src/src/resources/icons/${pname}.svg $out/share/pixmaps/${pname}.svg
''; '';
# test is broken in nix for some reason # test is broken in nix for some reason
doInstallCheck = false; doInstallCheck = false;
doCheck = false; doCheck = false;
meta = with lib; { meta = with lib; {
description = "A wip universal Linux settings application."; description = "A wip universal Linux settings application.";
homepage = "https://github.com/Xetibo/ReSet"; homepage = "https://github.com/Xetibo/ReSet";
changelog = "https://github.com/Xetibo/ReSet/releases/tag/${version}"; changelog = "https://github.com/Xetibo/ReSet/releases/tag/${version}";
license = licenses.gpl3; license = licenses.gpl3;
maintainers = with maintainers; [DashieTM]; maintainers = with maintainers; [ DashieTM ];
mainProgram = "ReSet"; mainProgram = "ReSet";
}; };
} }