Skip to content

Commit

Permalink
Fix some nits in the default
Browse files Browse the repository at this point in the history
  • Loading branch information
RossSmyth committed Mar 2, 2025
1 parent 4edfad0 commit f261ac8
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{
pkgs,
lib,
rustPlatform,
stdenv,
callPackage,
runCommand,
installShellFiles,
git,
...
}: let
fs = pkgs.lib.fileset;
fs = lib.fileset;

src = fs.difference (fs.gitTracked ./.) (fs.unions [
./.envrc
Expand All @@ -13,7 +18,7 @@
./book
./docs
./flake.lock
(fs.fileFilter (file: pkgs.lib.strings.hasInfix ".git" file.name) ./.)
(fs.fileFilter (file: lib.strings.hasInfix ".git" file.name) ./.)
(fs.fileFilter (file: file.hasExt "svg") ./.)
(fs.fileFilter (file: file.hasExt "md") ./.)
(fs.fileFilter (file: file.hasExt "nix") ./.)
Expand All @@ -23,8 +28,8 @@
# that they reside in. It is built by calling the derivation in the
# grammars.nix file, then taking the runtime directory in the git repo
# and hooking symlinks up to it.
grammars = pkgs.callPackage ./grammars.nix {};
runtimeDir = pkgs.runCommand "helix-runtime" {} ''
grammars = callPackage ./grammars.nix {};
runtimeDir = runCommand "helix-runtime" {} ''
mkdir -p $out
ln -s ${./runtime}/* $out
rm -r $out/grammars
Expand All @@ -35,16 +40,11 @@ in
# hooked up. To get around this while having good customization, mkDerivation is
# used instead.
rustPlatform.buildRustPackage (self: {
# START: Reevaluate the below attrs when
# https://github.com/NixOS/nixpkgs/pull/354999
# or
# https://github.com/NixOS/nixpkgs/pull/194475
# Are merged.
cargoLock.lockFile = ./Cargo.lock;

nativeBuildInputs = [
pkgs.installShellFiles
pkgs.git
installShellFiles
git
];

buildType = "release";
Expand Down

0 comments on commit f261ac8

Please sign in to comment.