-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
walksnail-osd-tool: init at 0.3.0 #310812
base: master
Are you sure you want to change the base?
Conversation
depends on #310808 |
moved to |
f54d9f0
to
76d08da
Compare
buildInputs = [ | ||
openssl | ||
]; | ||
OPENSSL_NO_VENDOR = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OPENSSL_NO_VENDOR = 1; | |
env = { | |
OPENSSL_NO_VENDOR = 1; | |
}; |
postFixup = | ||
let | ||
rpath = lib.makeLibraryPath [ libGL ]; | ||
in | ||
'' | ||
patchelf --add-rpath ${rpath} $out/bin/.${pname}-wrapped | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be simplified.
postFixup = | |
let | |
rpath = lib.makeLibraryPath [ libGL ]; | |
in | |
'' | |
patchelf --add-rpath ${rpath} $out/bin/.${pname}-wrapped | |
''; | |
postFixup = '' | |
patchelf $out/bin/.${pname}-wrapped \ | |
--add-rpath ${lib.makeLibraryPath [ libGL ]} | |
''; |
src = fetchFromGitHub { | ||
owner = "avsaase"; | ||
repo = pname; | ||
rev = "1044026bab773386fe96e20b544f60ad73d24e3f"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rev = "1044026bab773386fe96e20b544f60ad73d24e3f"; | |
rev = "refs/tags/v${version}"; |
+ println!("cargo:rustc-env=VERGEN_CARGO_TARGET_TRIPLE=x86_64-unknown-linux-gnu"); | ||
+ println!("cargo:rustc-env=VERGEN_RUSTC_SEMVER=nixos-unstable-latest"); | ||
+ println!("cargo:rustc-env=GIT_VERSION=v0.3.0"); | ||
+ println!("cargo:rustc-env=GIT_COMMIT_HASH=1044026bab773386fe96e20b544f60ad73d24e3f"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put these variables into env
, like OPENSSL_NO_VENDOR
. Hardcoding version and hashes would break automated updating scripts. VERGEN_CARGO_TARGET_TRIPLE
should not be tied to a particular architecture (x86_64).
Also, does it need each of these variables at all?
Please follow the commit conventions. Squash both of your commits into a single commit named |
76d08da
to
5c0d231
Compare
5c0d231
to
c9908bd
Compare
@xzfc Thanks for the review! I've now addressed all your comments. |
@MikaelFangel @eclairevoyant sorry for pulling you in on completely unrelated PRs, but could you please review this one? |
@JohnRTitor I know you have nothing to do with this PR but I don't know whom to ask to move things forward. Please help me with this. |
|
||
rustPlatform.buildRustPackage rec { | ||
pname = "walksnail-osd-tool"; | ||
version = "0.3.0"; # don't forget to update the make-build-reproducible.patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version = "0.3.0"; # don't forget to update the make-build-reproducible.patch | |
version = "0.3.0"; |
we'll notice that when the patch no longer applies 😅
cargo | ||
cmake | ||
copyDesktopItems | ||
openssl.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need that in nativeBuildInputs?
buildInputs = [ | ||
openssl | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buildInputs = [ | |
openssl | |
]; | |
buildInputs = [ | |
openssl | |
]; | |
patchelf $out/bin/.${pname}-wrapped \ | ||
--add-rpath ${lib.makeLibraryPath [ libGL ]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
patchelf $out/bin/.${pname}-wrapped \ | |
--add-rpath ${lib.makeLibraryPath [ libGL ]} | |
patchelf $out/bin/.walksnail-osd-tool-wrapped \ | |
--add-rpath ${lib.makeLibraryPath [ libGL ]} |
Also doing that preFixup if possible, would allow us to use the unwrapped name.
name = pname; | ||
exec = pname; | ||
icon = pname; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name = pname; | |
exec = pname; | |
icon = pname; | |
name = "walksnail-osd-tool"; | |
exec = "walksnail-osd-tool"; | |
icon = "walksnail-osd-tool"; |
fbecc0f
to
57ced12
Compare
57ced12
to
e20f3ee
Compare
Description of changes
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.