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

veracrypt: init at 1.19 #24424

Merged
merged 3 commits into from Apr 2, 2017
Merged

veracrypt: init at 1.19 #24424

merged 3 commits into from Apr 2, 2017

Conversation

dsferruzza
Copy link
Member

Motivation for this change

TrueCrypt has been discontinued for several years.
This PR adds a package for VeraCrypt, a maintained fork of TrueCrypt.

I used truecrypt package as a start, and tried to create a nice package; but I'm a beginner so I guess not everything is perfect.
I would be happy to have feedback and advices!

I tested this package on NixOS.
I was able to successfully do the following steps:

  • run VeraCrypt
  • create a container
  • mount it
  • store a file in it
  • unmount it
  • move it to another computer running another OS with an official binary version of VeraCrypt
  • mount it
  • recover my file

I let the maintainers field empty.
I don't know if I should add myself, or @viric (the truecrypt package maintainer), or someone else.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

cd Vera*/src
'';

buildInputs = [ pkgconfig fuse devicemapper wxGTK30 nasm makeself ];
Copy link
Contributor

Choose a reason for hiding this comment

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

pkgconfig goes into nativeBuildInputs

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

homepage = https://veracrypt.codeplex.com/;
license = "VeraCrypt License";
maintainers = null; # TO DEFINE
platforms = with stdenv.lib.platforms; linux;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be platforms = platforms.linux since it is only one platform

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

@dsferruzza
Copy link
Member Author

It seems the first change broke the build: https://travis-ci.org/NixOS/nixpkgs/jobs/216476198#L1575

@ndowens Any idea of why it happened?
I tried it on my machine but it didn't rebuild the package so I assumed it didn't need to because the result would be the same.
Also I couldn't find the difference between buildInputs and nativeBuildInputs.

description = "Free Open-Source filesystem on-the-fly encryption";
homepage = https://veracrypt.codeplex.com/;
license = "VeraCrypt License";
maintainers = null; # TO DEFINE
Copy link
Member

Choose a reason for hiding this comment

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

Do you want to maintains this package?

Copy link
Member Author

Choose a reason for hiding this comment

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

What does it implies exactly?
Updating the package when there is an update upstream?

Copy link
Contributor

Choose a reason for hiding this comment

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

It implies that you have some vested interest in the package; I don't think there's an implication of a certain level of commitment, really, but you can expect to be pinged if there's an issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK I understand!
So I shall add myself in lib/maintainers.nix and update the field in the package, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

That'd be great :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

@ndowens
Copy link
Contributor

ndowens commented Mar 30, 2017

The change didn't break it. Travis seems to be broken again. The difference between the buildinputs is that native is is used for building the pkg vs buildinputs is for what the pkg uses for runtime

@dsferruzza
Copy link
Member Author

@ndowens I don't believe that the names perfectly describe the semantics, but thanks for the explanation I'll keep that in mind :)

cd Vera*/src
'';

nativeBuildInput = [ pkgconfig ];
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: should be nativeBuildInputs

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh indeed! I fixed it

@joachifm
Copy link
Contributor

The travis error is legit.

@dsferruzza dsferruzza force-pushed the add-veracrypt branch 2 times, most recently from b247e31 to 8846f93 Compare March 30, 2017 12:11
@joachifm
Copy link
Contributor

Added a few things for you to consider.

@dsferruzza
Copy link
Member Author

Thanks I learned a few tips ^_^

- Conditionally add wxGTK30 to inputs to avoid
  eval'ing it regardless of wxGUI
- Patch full path to exe into desktop file
- Move some inputs to native
- Do not write intermediate tar file on unpack
@joachifm joachifm merged commit 144d1e7 into NixOS:master Apr 2, 2017
@joachifm
Copy link
Contributor

joachifm commented Apr 2, 2017

Thank you

@dsferruzza
Copy link
Member Author

Thank you for helping me ^_^

Do you now if/when the package will be available in a release channel?

@joachifm
Copy link
Contributor

joachifm commented Apr 3, 2017

It's already in the unstable channel, but hasn't been picked to the release branch.

@dsferruzza
Copy link
Member Author

OK!
So how does it work? Do I need to wait until the next release freeze or is there another way?

@joachifm
Copy link
Contributor

joachifm commented Apr 3, 2017

You can submit a PR against the release branch, containing cherry-picked patches (please use -x to retain a reference to the original commit).

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.

None yet

4 participants