diff --git a/flake.nix b/flake.nix index a79c9d9..17d6042 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,14 @@ -# github.com/brianmcgee has lots of great ideas for going above and beyond for this +# To update to the newest version of SWORD do the following: +# * Scroll down to the line where the "rev" is listed +# * Update that value to match the latest revision of SWORD's SVN trunk +# * Comment out the hash line below that +# * Run a `nix build` on the current target +# * When you receive an error about the hash mismatch, copy the correct value +# and paste it into the hash as the new value, then uncomment the hash +# * Run the build again. It won't need to re-fetch the sources, it will only +# execute the build { - description = "Greg's homepage"; + description = "Subversion SWORD builds."; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; @@ -61,6 +69,15 @@ packages = let win = pkgs.pkgsCross.mingwW64; + svnSword = ( + win.sword.overrideAttrs { + src = pkgs.fetchsvn { + url = "https://svn.crosswire.org/svn/sword/trunk"; + rev = "3895"; + hash = "sha256-ju6TsfiAUquXbost6PzStHDLfvOJTNON/iSIupi6IOc="; + }; + } + ); in { default = pkgs.stdenv.mkDerivation { @@ -68,7 +85,7 @@ phases = [ "installPhase" ]; installPhase = '' mkdir -p $out - pushd ${win.sword} + pushd ${svnSword} ${pkgs.gnutar}/bin/tar cvhaf $out/sword.tar.xz * ''; };