Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Nix Flake to run with Nix #38

Open
wants to merge 4 commits into
base: nix
Choose a base branch
from
Open

Add Nix Flake to run with Nix #38

wants to merge 4 commits into from

Conversation

OhMyMndy
Copy link
Contributor

@OhMyMndy OhMyMndy commented Mar 29, 2024

Hello!

Thanks for this awesome project!

I created a Nix Flake, so you can run dzr with one command. All the dependencies are included in the Flake and locked to a specific version.

To update the dependencies nix flake update can be run and the flake.lock file will be updated in place with the latest packages from nixpkgs-unstable.

To develop with Nix, just clone the repo and run nix run in the directory to run the local version of ./dzr! Passing arguments can be done as such nix run . -- /track/2317752015 or run the Flake directly: nix run github:OhMyMndy/dzr/1be7e5288d6c8b9226c2596a615225630ee7b848' -- /track/2317752015 for one of the last commits in this PR. You cannot link directly to a branch since that is not reproducible because you don't know when the upstream branch changes, the commit hash either exists, or it doesn't, always giving the same application and dependencies.

@yne
Copy link
Owner

yne commented Mar 29, 2024

damn, I shall really try nix. this looks really cool

instead of the Nix paragraph in the readme, can you put something like

Nix + Flakes | blablabla

in the Install table (and move the row before vscode, with all others Oses)

@yne
Copy link
Owner

yne commented Apr 3, 2024

Changed + merged 🎉

@OhMyMndy Would it be possible to move nix-related files into a subfolder ?

@OhMyMndy
Copy link
Contributor Author

OhMyMndy commented Apr 6, 2024

I don't think that is possible, at least it isn't as bad as having a Javascript project which has 20 different config files in the root directory of your project.

Thanks for merging!

@OhMyMndy
Copy link
Contributor Author

OhMyMndy commented Apr 6, 2024

Damn, I am such an idiot, had the command in the README wrong, but correct in my first comment in this PR

@yne
Copy link
Owner

yne commented Apr 6, 2024

ni biggie I'll update to

nix run github:yne/dzr

Also, the use of %s in unscramble printf has broken the key extract (and brew CI checks)

dzr

# extraction + warning by charleywright, see: https://github.com/yne/dzr/issues/11
unscramble(){ printf "${8}${16}${7}${15}${6}${14}${5}${13}${4}${12}${3}${11}${2}${10}${1}${9}";}
unscramble(){ printf "%s" "${8}${16}${7}${15}${6}${14}${5}${13}${4}${12}${3}${11}${2}${10}${1}${9}";}
Copy link
Owner

Choose a reason for hiding this comment

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

we need the \ddd tranform

dzr
@@ -1,5 +1,7 @@
#!/bin/sh

BINARY_NAME="$(basename "$0")"
Copy link
Owner

Choose a reason for hiding this comment

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

this break usage form folder

./cgi-bin/dzr /track/117581954
xargs: dzr-url: No such file or directory

@yne
Copy link
Owner

yne commented Apr 6, 2024

@OhMyMndy
does using BINARY_NAME="$0" break nix ?

@yne
Copy link
Owner

yne commented Apr 6, 2024

I'm rewinding master since it does not work on my NixOS install (only dzr is copied into the /nix/store/) also too much breaking changes ($0 and key extract)

@yne yne changed the base branch from master to nix April 6, 2024 20:34
@yne yne mentioned this pull request Apr 7, 2024
@yne
Copy link
Owner

yne commented Apr 7, 2024

@OhMyMndy any chance to get this working ?

@OhMyMndy
Copy link
Contributor Author

@yne I'll give this another go this weekend!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants