aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2021-04-23 17:59:54 +0200
committerGitHub <noreply@github.com>2021-04-23 17:59:54 +0200
commit470373386cf33c3c7359d15a44d82d2d84a7c065 (patch)
treed989186957749135f72a708ba4f1489cb116c5e4
parentc203a5f626ba635ab3e4c5e9c3a9f79e44503a6e (diff)
parent86ca002b4eda27cac76c6bdc87dc7cef9a970aa3 (diff)
downloadopenrussian-cli-470373386cf33c3c7359d15a44d82d2d84a7c065.tar.gz
Merge pull request #2 from vs49688/master
Remove NixOS files and update README
-rw-r--r--README.md18
-rw-r--r--default.nix57
-rw-r--r--shell.nix7
3 files changed, 18 insertions, 64 deletions
diff --git a/README.md b/README.md
index 01ff0c6..31b49b5 100644
--- a/README.md
+++ b/README.md
@@ -39,6 +39,8 @@ Possible future features:
## Installation
+### Ubuntu
+
Build-time dependencies:
sudo apt-get install make pkg-config lua5.2 bash-completion wget unzip gawk sqlite3
@@ -70,6 +72,22 @@ If it returns lots of errors, you should probably stay with the original databas
Otherwise, the error messages might help in fixing/upgrading the script.
You are of course welcome to contribute patches. :-)
+### NixOS
+
+`openrussian-cli` is part of the `nixos-unstable` (and soon `nixos-21.05`) channels.
+
+To install `openrussian-cli` on NixOS:
+* Via `configuration.nix`:
+ ```nix
+ environment.systemPackages = [ pkgs.openrussian-cli ];
+ ```
+* Via `nix-env`:
+ ```bash
+ nix-env -iA openrussian-cli
+ ```
+
+See https://nixos.org/manual/nixos/stable/index.html#sec-package-management for more information.
+
### Bash Aliases
While the default command name `openrussian` was chosen to avoid cluttering the
diff --git a/default.nix b/default.nix
deleted file mode 100644
index 0a784a2..0000000
--- a/default.nix
+++ /dev/null
@@ -1,57 +0,0 @@
-{ stdenv, lib, nix-gitignore, gnumake, pkgconfig, wget, unzip, gawk
-, sqlite, which, luaPackages, installShellFiles, makeWrapper
-}:
-let
- luaLibs = with luaPackages; [ lua luasql-sqlite3 luautf8 ];
-in
-stdenv.mkDerivation rec {
- pname = "openrussian-cli";
- version = "1.0.0";
-
- src = nix-gitignore.gitignoreSource [] ./.;
-
- nativeBuildInputs = [
- gnumake pkgconfig wget unzip gawk sqlite which installShellFiles
- ];
-
- buildInputs = [ makeWrapper ] ++ luaLibs;
-
- makeFlags = [
- "LUA=${luaPackages.lua}/bin/lua"
- "LUAC=${luaPackages.lua}/bin/luac"
- ];
-
- dontConfigure = true;
-
- # Disable check as it's too slow.
- # doCheck = true;
-
- #This is needed even though it's the default for some reason.
- checkTarget = "check";
-
- # Can't use "make install" here
- installPhase = ''
- mkdir -p $out/bin $out/share/openrussian
- cp openrussian-sqlite3.db $out/share/openrussian
- cp openrussian $out/bin
-
- wrapProgram $out/bin/openrussian \
- --prefix LUA_PATH ';' "$LUA_PATH" \
- --prefix LUA_CPATH ';' "$LUA_CPATH"
-
- runHook postInstall
- '';
-
- postInstall = ''
- installShellCompletion --bash --name openrussian ./openrussian-completion.bash
- installManPage ./openrussian.1
- '';
-
- meta = with lib; {
- homepage = "https://github.com/rhaberkorn/openrussian-cli";
- description = "Offline Console Russian Dictionary (based on openrussian.org)";
- license = with licenses; [ gpl3 mit cc-by-sa-40 ];
- platforms = platforms.unix;
- };
-}
-
diff --git a/shell.nix b/shell.nix
deleted file mode 100644
index 93c27dc..0000000
--- a/shell.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ pkgs ? (import <nixpkgs> {}) }:
-let
- openrussian = pkgs.callPackage ./default.nix {};
-in
-pkgs.mkShell {
- buildInputs = [ openrussian ];
-}