Skip to content

Conversation

@randoneering
Copy link

The following pull request is for adding Atuin-Desktop to nixpkgs. Atuin-Desktop is an Open Source app that provides executable runbooks that incorporate executable code into documentation. You can read more by clicking the links below:

Github Repo

Website Link

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@randoneering
Copy link
Author

In order to make this a clean contribution, I closed #448104 and resubmitted this PR following the contributions guide. Additionally, I followed the suggestions from the reviewers.
@Adda0 @dzervas

@nixpkgs-ci nixpkgs-ci bot added the 12.first-time contribution This PR is the author's first one; please be gentle! label Oct 4, 2025
Comment on lines 93 to 119
echo "=== Debugging binary ==="
if [ -f "$out/bin/atuin-desktop" ]; then
echo "Binary exists"
file "$out/bin/atuin-desktop"
ldd "$out/bin/atuin-desktop" || echo "ldd failed"
readelf -l "$out/bin/atuin-desktop" | grep interpreter || echo "No interpreter found"
else
echo "Binary not found, listing contents:"
find "$out" -name "*atuin*" -type f
fi
echo "=== End debugging ==="
find $out/bin -type f -executable | while read -r bin; do
echo "Patching binary: $bin"
# Check if it's an ELF binary
if file "$bin" | grep -q "ELF"; then
echo " Setting interpreter..."
patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} "$bin" || echo " Failed to set interpreter"
echo " Setting rpath..."
patchelf --set-rpath ${lib.makeLibraryPath buildInputs} "$bin" || echo " Failed to set rpath"
echo " Shrinking rpath..."
patchelf --shrink-rpath "$bin" || echo " Failed to shrink rpath"
fi
done
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you reduce this to only keep the patchelf commands?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I attempted to remove this section but failed to get the package to build successfully. I would like to leave this is until I can trim this down. The build would succeed with just the patchelf statements, but the binary would fail to run:

Could not start dynamically linked executable: ./result/bin/atuin-desktop
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` labels Oct 4, 2025
@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 5, 2025
maintainers = with lib.maintainers; [
randoneering
dzervas
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
];
];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];

'';

meta = {
description = "Atuin Desktop";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you flesh out the description a bit more? Maybe like

Suggested change
description = "Atuin Desktop";
description = "GUI application for creating executable runbooks with shell commands";

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh geez. Of course! Sorry I missed carrying this over from my local package.

preFixup = ''
gappsWrapperArgs+=(
# Ensure the binary can find all required libraries
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath finalAttrs.buildInputs}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the patchelf stuff not fix this already?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll double check. I don't think it did but I'll verify when I'm back at my computer.

@Adda0 Adda0 mentioned this pull request Oct 5, 2025
13 tasks
@randoneering
Copy link
Author

#448901

The follow PR is for the atuin-desktop package built from source rather than the deb binary. I am going to close this as we should be focusing on building from source. Thanks everyone for your comments and review!

@randoneering randoneering deleted the init/atuin-desktop branch October 6, 2025 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants