Skip to content

Instantly share code, notes, and snippets.

@evanjs
Created July 14, 2020 15:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evanjs/b517f6e7ba39e16ec0a3f63de050558d to your computer and use it in GitHub Desktop.
Save evanjs/b517f6e7ba39e16ec0a3f63de050558d to your computer and use it in GitHub Desktop.
winbox script/expression for nix
#!/usr/bin/env nix-shell
#! nix-shell -p wine -i sh
wine ~/bin/winbox.exe
# non nix (dependencies) version
{ lib, wine, ... }:
with rec {
version = "3.24";
src = builtins.fetchurl {
url = "https://download.mikrotik.com/winbox/${version}/winbox64.exe";
sha256 = "1sidsgms203cpvgv3rg95gz2gncgxwx5l0myard8ns5z51liygbr";
};
runWine = runCommand "wine-cmd" {
buildInputs = [ wine ];
};
winbox = runWine src;
};
import winbox
nix-shell -E 'with import <nixpkgs> {}; with rec { version = "3.24"; src = builtins.fetchurl { url = "https://download.mikrotik.com/winbox/${version}/winbox64.exe"; sha256 = "1sidsgms203cpvgv3rg95gz2gncgxwx5l0myard8ns5z51liygbr"; }; runWine = runCommand "wine-cmd" { buildInputs = [ wine ]; }; winbox = runWine src; }; import winbox'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment