Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

nix: reorganizing #52273

Merged
merged 7 commits into from
May 31, 2023
Merged

nix: reorganizing #52273

merged 7 commits into from
May 31, 2023

Conversation

Strum355
Copy link
Contributor

@Strum355 Strum355 commented May 22, 2023

Re-organizing a couple of things to make the individual files nicer, consolidated some things in ctags.nix, extracted forEachSystem stuff to flake.nix instead of the individual files, overlay for our specific nodejs requirements, some more comments to stuff

Test plan

N/A, nix stuff

@Strum355 Strum355 added the nix For Nix(OS) related issues/PRs label May 22, 2023
@Strum355 Strum355 self-assigned this May 22, 2023
@cla-bot cla-bot bot added the cla-signed label May 22, 2023
@Strum355 Strum355 marked this pull request as ready for review May 23, 2023 10:12
@Strum355 Strum355 requested review from keegancsmith and burmudar May 23, 2023 10:12
Copy link
Member

@keegancsmith keegancsmith left a comment

Choose a reason for hiding this comment

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

Haven't tested on my machine, but can follow up if there is any issue

dev/nix/ctags.nix Outdated Show resolved Hide resolved
postFixup = (oldAttrs.postFixup or "") + ''
ln -s $out/bin/ctags $out/bin/universal-ctags
'';
}))
Copy link
Member

Choose a reason for hiding this comment

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

I was thinking instead of overriding stuff, it might be clearer if we just copy the original derivation and make it do exactly what we want

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea that seems doable tbh, been on the fence about this for some time

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done 👍

};
})
nodePackages.typescript
nodejs-16_x.pkgs.pnpm
Copy link
Member

Choose a reason for hiding this comment

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

This works because of overlay?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup exactly

, hostPlatform
, lib
, writeShellScriptBin
}:
Copy link
Member

Choose a reason for hiding this comment

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

Does nix-shell auto add these args, or is it time to stop calling this shell.nix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its done by pkgs.callPackage if youre referring to what happens at runtime

Copy link
Member

Choose a reason for hiding this comment

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

I was refering to old school running of nix-shell instead of nix develop. IE it would be cool to move this file into dev/nix to avoid yet another file in our top-level dir.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah I think I can make this in particular backwards compat, but theres also the issue of us providing additional stuff via overlays etc that arent defined in here, so theres already going to be some discrepancies

Copy link
Member

Choose a reason for hiding this comment

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

yeah I don't think we need the backcompat. The users of it are you and I. I use it via nix develop personally.

@keegancsmith
Copy link
Member

tested on both nix-darwin and nixos and it worked. cool stuff

@Strum355 Strum355 changed the title wip nix: reorganizing nix: reorganizing May 23, 2023
@Strum355 Strum355 force-pushed the nsc/nix-shuffle2 branch from 0c966b1 to 6c68c9c Compare May 31, 2023 14:55
@Strum355 Strum355 merged commit 35a8f87 into main May 31, 2023
@Strum355 Strum355 deleted the nsc/nix-shuffle2 branch May 31, 2023 15:20
ErikaRS pushed a commit that referenced this pull request Jun 22, 2023
Re-organizing a couple of things to make the individual files nicer,
consolidated some things in ctags.nix, extracted forEachSystem stuff to
flake.nix instead of the individual files, overlay for our specific
nodejs requirements, some more comments to stuff

## Test plan

N/A, nix stuff
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed nix For Nix(OS) related issues/PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants