mirror of
https://github.com/Death916/nixconfig.git
synced 2026-04-10 02:54:39 -07:00
halloy desktop file
This commit is contained in:
parent
1cd23e57c7
commit
de941db12a
3 changed files with 105 additions and 18 deletions
|
|
@ -25,14 +25,11 @@ in
|
|||
|
||||
RUSTC_BOOTSTRAP = 1;
|
||||
|
||||
# Add doc_cfg to allowed features
|
||||
RUSTFLAGS = "-Z allow-features=edition2024,avx512_target_feature,stdarch_x86_avx512,doc_cfg";
|
||||
|
||||
postPatch = ''
|
||||
# Add feature flags to all relevant crates
|
||||
find . -name '*.rs' -exec sed -i '1i #![feature(avx512_target_feature,stdarch_x86_avx512,doc_cfg)]' {} \;
|
||||
|
||||
# Add cargo-features to Cargo.toml files
|
||||
find . -name Cargo.toml -exec sh -c '
|
||||
if ! grep -q "cargo-features" {}; then
|
||||
sed -i "1i cargo-features = [\"edition2024\"]" {}
|
||||
|
|
@ -44,7 +41,7 @@ in
|
|||
lockFile = src + "/Cargo.lock";
|
||||
outputHashes = {
|
||||
"cryoglyph-0.1.0" = "sha256-X7S9jq8wU6g1DDNEzOtP3lKWugDnpopPDBK49iWvD4o=";
|
||||
"dark-light-2.0.0" = "sha256-e826vF7iSkGUqv65TXHBUX04Kz2aaJJEW9f7JsAMaXE=";
|
||||
"dark-light-2.0.0" = "sha256-e826vF7iSkGUqv65TXHBUX04Kz2aaJJEW9f7JsAMxXE=";
|
||||
"iced-0.14.0-dev" = "sha256-FEGk1zkXM9o+fGMoDtmi621G6pL+Yca9owJz4q2Lzks=";
|
||||
"winit-0.30.8" = "sha256-hlVhlQ8MmIbNFNr6BM4edKdZbe+ixnPpKm819zauFLQ=";
|
||||
"dpi-0.1.1" = "sha256-hlVhlQ8MmIbNFNr6BM4edKdZbe+ixnPpKm819zauFLQ=";
|
||||
|
|
@ -68,7 +65,6 @@ in
|
|||
alsa-lib.dev
|
||||
];
|
||||
|
||||
# Add this postInstall phase to set up proper library paths
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/halloy \
|
||||
--prefix LD_LIBRARY_PATH : ${
|
||||
|
|
@ -80,6 +76,17 @@ in
|
|||
super.openssl
|
||||
]
|
||||
}
|
||||
|
||||
mkdir -p $out/share/applications
|
||||
cat > $out/share/applications/halloy.desktop << EOF
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Halloy IRC Client
|
||||
Exec=$out/bin/halloy
|
||||
Comment=A modern IRC client built with Rust
|
||||
Categories=Network;Chat;
|
||||
Terminal=false
|
||||
EOF
|
||||
'';
|
||||
|
||||
meta = with super.lib; {
|
||||
|
|
@ -90,3 +97,4 @@ in
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
92
overlays/halloy-overlay.nix.bak
Normal file
92
overlays/halloy-overlay.nix.bak
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
self: super:
|
||||
let
|
||||
rustNightly = super.rust-bin.nightly.latest.default.override {
|
||||
extensions = [
|
||||
"rust-src"
|
||||
"rustc-dev"
|
||||
];
|
||||
};
|
||||
nightlyRustPlatform = super.makeRustPlatform {
|
||||
cargo = rustNightly;
|
||||
rustc = rustNightly;
|
||||
};
|
||||
in
|
||||
{
|
||||
halloy = nightlyRustPlatform.buildRustPackage rec {
|
||||
pname = "halloy";
|
||||
version = "2025.6";
|
||||
|
||||
src = super.fetchFromGitHub {
|
||||
owner = "squidowl";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-a95PmVEx4j9euqh+z9MvzvwfmWCGydeZjDCfYLOM4tI=";
|
||||
};
|
||||
|
||||
RUSTC_BOOTSTRAP = 1;
|
||||
|
||||
# Add doc_cfg to allowed features
|
||||
RUSTFLAGS = "-Z allow-features=edition2024,avx512_target_feature,stdarch_x86_avx512,doc_cfg";
|
||||
|
||||
postPatch = ''
|
||||
# Add feature flags to all relevant crates
|
||||
find . -name '*.rs' -exec sed -i '1i #![feature(avx512_target_feature,stdarch_x86_avx512,doc_cfg)]' {} \;
|
||||
|
||||
# Add cargo-features to Cargo.toml files
|
||||
find . -name Cargo.toml -exec sh -c '
|
||||
if ! grep -q "cargo-features" {}; then
|
||||
sed -i "1i cargo-features = [\"edition2024\"]" {}
|
||||
fi
|
||||
' \;
|
||||
'';
|
||||
|
||||
cargoLock = {
|
||||
lockFile = src + "/Cargo.lock";
|
||||
outputHashes = {
|
||||
"cryoglyph-0.1.0" = "sha256-X7S9jq8wU6g1DDNEzOtP3lKWugDnpopPDBK49iWvD4o=";
|
||||
"dark-light-2.0.0" = "sha256-e826vF7iSkGUqv65TXHBUX04Kz2aaJJEW9f7JsAMaXE=";
|
||||
"iced-0.14.0-dev" = "sha256-FEGk1zkXM9o+fGMoDtmi621G6pL+Yca9owJz4q2Lzks=";
|
||||
"winit-0.30.8" = "sha256-hlVhlQ8MmIbNFNr6BM4edKdZbe+ixnPpKm819zauFLQ=";
|
||||
"dpi-0.1.1" = "sha256-hlVhlQ8MmIbNFNr6BM4edKdZbe+ixnPpKm819zauFLQ=";
|
||||
};
|
||||
};
|
||||
|
||||
nativeBuildInputs = with super; [
|
||||
pkg-config
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
buildInputs = with super; [
|
||||
libxkbcommon
|
||||
openssl
|
||||
vulkan-loader
|
||||
xorg.libX11
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXrandr
|
||||
wayland
|
||||
alsa-lib.dev
|
||||
];
|
||||
|
||||
# Add this postInstall phase to set up proper library paths
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/halloy \
|
||||
--prefix LD_LIBRARY_PATH : ${
|
||||
super.lib.makeLibraryPath [
|
||||
super.wayland
|
||||
super.libxkbcommon
|
||||
super.vulkan-loader
|
||||
super.alsa-lib
|
||||
super.openssl
|
||||
]
|
||||
}
|
||||
'';
|
||||
|
||||
meta = with super.lib; {
|
||||
description = "Halloy IRC Client";
|
||||
homepage = "https://github.com/squidowl/halloy";
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
self: super: {
|
||||
halloy = super.halloy.overrideAttrs (oldAttrs: rec {
|
||||
version = "2025.5";
|
||||
src = super.fetchFromGitHub {
|
||||
owner = "squidowl";
|
||||
repo = "halloy";
|
||||
rev = "2025.5";
|
||||
sha256 = "0000000000000000000000000000000000000000000000000000"; # <--- Replace after first build
|
||||
};
|
||||
# If the build fails due to Cargo.lock, you may also need to override cargoSha256:
|
||||
# cargoSha256 = "0000000000000000000000000000000000000000000000000000"; # Replace if needed
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue