Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
oxygen*sh | ||
*.eml | ||
license |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
(p: (import <nixpkgs> {}).callPackage p {}) | ||
( | ||
{ runCommand, requireFile, jdk | ||
, buildFHSUserEnv, makeWrapper | ||
}: | ||
let | ||
env = buildFHSUserEnv { | ||
name = "oxygen-env"; | ||
targetPkgs = pkgs: [ pkgs.jdk ]; | ||
runScript = '' | ||
bash -c "set -x | ||
cp ${./oxygen.sh} ./install.sh | ||
chmod +x ./install.sh | ||
sh ./install.sh" | ||
''; | ||
|
||
}; | ||
in runCommand "oxygen-cmd" { | ||
installer = ./oxygen.sh; | ||
buildInputs = [ jdk makeWrapper ]; | ||
} '' | ||
( | ||
echo 2 # language: Engish | ||
echo o # confirm we want to install | ||
echo "" # go to the next page of the license | ||
echo "" # go to the next page of the license | ||
echo "" # go to the next page of the license | ||
echo "" # go to the next page of the license | ||
echo "" # go to the next page of the license | ||
echo "" # go to the next page of the license | ||
echo "" # go to the next page of the license | ||
echo "" # go to the next page of the license | ||
echo "" # go to the next page of the license | ||
echo "" # go to the next page of the license | ||
echo "" # go to the next page of the license | ||
echo "" # go to the next page of the license | ||
echo "" # go to the next page of the license | ||
echo "" # go to the next page of the license | ||
echo "" # go to the next page of the license | ||
echo "" # go to the next page of the license | ||
echo "" # go to the next page of the license | ||
echo 1 # accept the license | ||
echo /build/staged # install to this directory | ||
echo "" # accept the default list of components | ||
# (only one, and it was selected, at this time) | ||
echo "n" # make desktop symlinks | ||
echo "n" # Run Oxygen XML Editor now? | ||
echo "n" # Privacy Options, saying Yes failed b/c no X11 | ||
) | ${env}/bin/oxygen-env | ||
mv staged $out | ||
cd $out | ||
# Leaving the jre directory makes oxygen prefer its own JRE over | ||
# our provided java | ||
rm -rf jre | ||
wrapProgram $out/oxygen.sh \ | ||
--set JAVA_HOME "$JAVA_HOME" | ||
'' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
name=oxygen-$(date).sh | ||
curl -L --output "$name" \ | ||
https://mirror.oxygenxml.com/InstData/Editor/Linux64/VM/oxygen-64bit.sh | ||
|
||
cp "$name" oxygen.sh | ||
nix-hash --type sha256 --base32 "oxygen.sh" > oxygen.sh.hash | ||
nix-store --add-fixed sha256 oxygen.sh |