Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nubank/nixpkgs
Nix Packages collection used in Nubank
https://github.com/nubank/nixpkgs
nix nix-overlay nixos nixpkgs nubank
Last synced: 4 months ago
JSON representation
Nix Packages collection used in Nubank
- Host: GitHub
- URL: https://github.com/nubank/nixpkgs
- Owner: nubank
- License: mit
- Created: 2020-08-28T15:03:36.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-20T18:17:38.000Z (9 months ago)
- Last Synced: 2024-09-28T09:20:26.947Z (4 months ago)
- Topics: nix, nix-overlay, nixos, nixpkgs, nubank
- Language: Nix
- Homepage:
- Size: 121 KB
- Stars: 33
- Watchers: 674
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nubank overlay for Nixpkgs
## Contents of the overlay
### `dart` and `flutter`
Pinned version of Dart/Flutter used in Nubank. Should be used together.
### `flutter-patch`
It is an alternative to `dart`/`flutter` above. This script patches a vanilla
Flutter SDK installation. Just use it like this:```shell
flutter-patch $FLUTTER_ROOT
```Keep in mind that using this script is kind trick. That is because Flutter SDK
downloads some binaries afterwards. Everytime Flutter downloads some binaries
you need to rerun this script. You will see strange problems otherwise (i.e.:
`flutter` commands failing to run or `no such file or directory` errors).So using `dart`/`flutter` packages is **recommended** and this script should
be used as a last resort.### `hover`
[Hover](https://github.com/go-flutter-desktop/hover) allows running Flutter
apps in desktop.This package for now it is impure. It builds some Go dependencies at runtime,
including `go-flutter` (that is a C dependency). If you have issues with
linking phase, delete the following files:```shell
rm -rf `go env GOPATH`
rm -rf `go env GOCACHE`
```### `{all,...}-tools`
This is a list of packages that can be appended to your
`environment.systemPackages` like this:```nix
{
# ...
environment.systemPackages =
[...]
++ nubank.all-tools
# Not included by default since they're proprietary tools
++ nubank.desktop-tools;
# ...
}
```This will add multiple applications used in Nubank. The usage is optional,
but this make it easier to install all tools and keep them up-to-date.## Usage of the overlay
### Latest master each rebuild
One way, and probably the most convenient way to pull in this overlay is by
just fetching the tarball of latest master on rebuild.This has side-effects if packages breaks or things like that you may want
to be in control of which revision of the overlay you run.For this option, just add this to your `/etc/nixos/configuration.nix`:
```nix
{
nixpkgs.overlays = [
(import (builtins.fetchTarball {
url = https://github.com/nubank/nixpkgs/archive/master.tar.gz;
}))
];
}
```Afterwards, also edit your systemPackages configuration in `/etc/nixos/configuration.nix` to look something like this:
```nix
{
# ...
environment.systemPackages = with pkgs; [
nubank.flutter
nubank.dart
nubank.hover
] ++ nubank.all-tools;
# ...
}
```## Testing local
You can test your new/updated derivation updating the `shell.nix`, you just
need to update the `buildInputs` with the derivation you want to build then
run:```bash
nix-shell
```With that you will have a shell with your built derivation.
Also, using `nix-shell --pure` allows you to test just your derivation without
your system packages, making it easier to debug issues.