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 git sync #41876
Add git sync #41876
Conversation
96d9587
to
b110ef6
Compare
}: | ||
|
||
stdenv.mkDerivation rec { | ||
name = "git-sync"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version should be part of the name like "name-${version}"
. In the case of a project like this with no releases, we typically use the date the commit was made Oct 24, 2015, so we'd use 20151024
as the version. This would let us have increasing version numbers when we make updates to the package. (Assuming updates are continuing for this package!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version should probably be unstable-2015-10-24
, see https://nixos.org/nixpkgs/manual/#sec-package-naming.
b110ef6
to
2ac8ac8
Compare
@ryantm Is there a better way to test the resulting binary than using
And then testing what is produced in the result directory? |
This package would better fit in the |
@IvanMalison You could build it in a more restricted way:
Can you change the commit message to say "git-sync: init at 20151024"? I think xeji is right about the file location too. |
2ac8ac8
to
5313813
Compare
@GrahamcOfBorg build git-sync |
Success on aarch64-linux (full log) Attempted: git-sync Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: git-sync Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: git-sync Partial log (click to expand)
|
@ryantm I think that in this case, sinceall building involves copying a file, the more important test is at runtime. I tried running the resulting wrapped binary with |
@IvanMalison You could try |
@ryantm Things look good. Is something blocking merge? |
By convention, git-related tools in nixpkgs are not added to the top level but bundled under gitAndTools.
@GrahamcOfBorg build gitAndTools.git-sync |
Success on aarch64-linux (full log) Attempted: gitAndTools.git-sync Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: gitAndTools.git-sync Partial log (click to expand)
|
@IvanMalison By convention, git-related tools in nixpkgs are not added to |
Success on x86_64-darwin (full log) Attempted: gitAndTools.git-sync Partial log (click to expand)
|
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)This is my the first derivation I've added, so let me know if anything looks strange.
I'm sure this is explained somewhere, but its not clear to me how useSandbox should be used, or where it should be set. The build section of this package is literally just a copy, but i'd still like to know how to do this.