save-my-r710/flake.nix

67 lines
2.1 KiB
Nix
Raw Normal View History

2022-11-06 01:46:26 +01:00
{
2022-11-07 15:49:46 +01:00
description = "java web applet resurrection";
inputs = {
nixpkgs.url = "nixpkgs/nixos-22.05";
old-nixpkgs = {
flake = false;
# See https://lazamar.co.uk/nix-versions/?channel=nixpkgs-unstable&package=icedtea-web
# 1.5.2 - 2015-04-13
# url = "https://github.com/NixOS/nixpkgs/archive/df31a338dcfbbc1561905eb02224912c82a92fc7.tar.gz";
# 1.6 - 2015-08-31
# url = "https://github.com/NixOS/nixpkgs/archive/00abee22bee06fdb57ee67cc514ab387deb186c9.tar.gz";
# 1.6.1 - 2016-02-08
url = "https://github.com/NixOS/nixpkgs/archive/dd7e6bd97fc26b72fb6ac9e9d6f9750980fd3f56.tar.gz";
# 1.6.2 - 2018-03-12
# url = "https://github.com/NixOS/nixpkgs/archive/2c9d2d65266c2c3aca1e4c80215de8bee5295b04.tar.gz";
# 1.7.1 - 2019-06-24
# url = "https://github.com/NixOS/nixpkgs/archive/4599f2bb9a5a6b1482e72521ead95cb24e0aa819.tar.gz";
};
};
outputs = { self, nixpkgs, old-nixpkgs }: let
2022-11-06 01:46:26 +01:00
system = "x86_64-linux";
2022-11-07 15:49:46 +01:00
pkgs = import nixpkgs { inherit system; };
old-pkgs = import old-nixpkgs { inherit system; };
2022-11-06 01:46:26 +01:00
in {
2022-11-07 15:49:46 +01:00
apps.${system} = {
default = self.apps.${system}.javaws-adjusted-viewer;
javaws = {
type = "app";
program = "${self.packages.${system}.icedtea-web}/bin/javaws";
};
javaws-adjusted-viewer = {
type = "app";
program = let
inherit (self.packages.${system}) icedtea-web adjusted-viewer;
executable = pkgs.writeShellScriptBin "javaws-adjusted-viewer"''
${icedtea-web}/bin/javaws --verbose ${adjusted-viewer}/viewer.jnlp
'';
in "${executable}/bin/javaws-adjusted-viewer";
};
};
packages.${system} = {
icedtea-web = old-pkgs.icedtea8_web;
adjusted-viewer = pkgs.callPackage ./adjust-viewer.nix {
ip = "localhost";
https-port = 8000;
kmport = 5900;
vport = 5900;
original-viewer-path = ./viewer.jnlp;
};
2022-11-06 01:46:26 +01:00
};
devShells.${system}.default = pkgs.mkShell {
packages = with self.packages.${system}; [ icedtea-web ];
};
};
}