Files
atuin-mirror/atuin.nix
Eric Crosson be3f283a54 build: remove legacy Apple SDK frameworks (#2885)
Thanks for your work on atuin! I've loved using it over the past year.

According to nixos.org[^1], the `darwin.apple_sdk` frameworks have been stubs for some time, and are now removed. Evaluating `atuin` on darwin on `nixpkgs-unstable` results in the following evaluation error:

```
error: darwin.apple_sdk_11_0 has been
  removed as it was a legacy compatibility stub; see
  <https://nixos.org/manual/nixpkgs/stable/#sec-darwin-legacy-frameworks>
  for migration instructions
```

According to those linked docs, the fix is to remove references to these SDKs, which will not have any other effect since they were stubs anyway.

[^1]: https://nixos.org/manual/nixpkgs/stable/#sec-darwin-legacy-frameworks

<!-- Thank you for making a PR! Bug fixes are always welcome, but if you're adding a new feature or changing an existing one, we'd really appreciate if you open an issue, post on the forum, or drop in on Discord -->

## Checks
- [x] I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
- [x] I have checked that there are no existing pull requests for the same thing
2025-09-09 19:35:41 -07:00

45 lines
1.2 KiB
Nix

# Atuin package definition
#
# This file will be similar to the package definition in nixpkgs:
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/at/atuin/package.nix
#
# Helpful documentation: https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/rust.section.md
{
lib,
stdenv,
installShellFiles,
rustPlatform,
libiconv,
}:
rustPlatform.buildRustPackage {
name = "atuin";
src = lib.cleanSource ./.;
cargoLock = {
lockFile = ./Cargo.lock;
# Allow dependencies to be fetched from git and avoid having to set the outputHashes manually
allowBuiltinFetchGit = true;
};
nativeBuildInputs = [installShellFiles];
buildInputs = lib.optionals stdenv.isDarwin [libiconv];
postInstall = ''
installShellCompletion --cmd atuin \
--bash <($out/bin/atuin gen-completions -s bash) \
--fish <($out/bin/atuin gen-completions -s fish) \
--zsh <($out/bin/atuin gen-completions -s zsh)
'';
doCheck = false;
meta = with lib; {
description = "Replacement for a shell history which records additional commands context with optional encrypted synchronization between machines";
homepage = "https://github.com/atuinsh/atuin";
license = licenses.mit;
mainProgram = "atuin";
};
}