Skip to content

emacsPackages.tsc: refactor#335438

Merged
jian-lin merged 1 commit intoNixOS:masterfrom
linj-fork:pr/refactor-emacs-tsc
Aug 19, 2024
Merged

emacsPackages.tsc: refactor#335438
jian-lin merged 1 commit intoNixOS:masterfrom
linj-fork:pr/refactor-emacs-tsc

Conversation

@jian-lin
Copy link
Contributor

@jian-lin jian-lin commented Aug 17, 2024

  • use melpaBuild as the main derivation
  • use cargoLock due to git deps in Cargo.lock
  • use nix-update-script as the update script
  • fix errors in native compilations
  • rename dynamic module with the help of stdenv.hostPlatform.extensions.sharedLibrary instead of bash magic
  • remove unneeded rustPlatform.bindgenHook

part of #335442

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@jian-lin jian-lin requested a review from adisbladis as a code owner August 17, 2024 18:54
@github-actions github-actions bot added the 6.topic: emacs Text editor label Aug 17, 2024
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Aug 17, 2024
Copy link
Member

Choose a reason for hiding this comment

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

We shouldn't check lock files into nixpkgs: #327064.

Copy link
Contributor Author

@jian-lin jian-lin Aug 18, 2024

Choose a reason for hiding this comment

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

When there are git dependencies in Cargo.lock, we have to do this instead of using cargoHash.

if grep '^source = "git' Cargo.lock; then
echo
echo "ERROR: The Cargo.lock contains git dependencies"
echo
echo "This is currently not supported in the fixed-output derivation fetcher."
echo "Use cargoLock.lockFile / importCargoLock instead."
echo
exit 1
fi

IMHO, #327064 means if there is no git dependency we should always prefer cargoHash.

@jian-lin jian-lin requested a review from adisbladis August 18, 2024 05:07
@jian-lin jian-lin force-pushed the pr/refactor-emacs-tsc branch from bc0a894 to 613764e Compare August 18, 2024 22:44
- use melpaBuild as the main derivation
- use cargoLock due to git deps in Cargo.lock
- use nix-update-script as the update script
- fix errors in native compilations
- rename dynamic module with the help of
  stdenv.hostPlatform.extensions.sharedLibrary instead of bash magic
- remove unneeded rustPlatform.bindgenHook
@jian-lin jian-lin force-pushed the pr/refactor-emacs-tsc branch from 613764e to f7fbcb8 Compare August 18, 2024 22:54
@jian-lin jian-lin merged commit 67c501f into NixOS:master Aug 19, 2024
@jian-lin jian-lin deleted the pr/refactor-emacs-tsc branch August 19, 2024 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: emacs Text editor 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants