commit
64a4f08433
@ -0,0 +1,2 @@
|
||||
# Result directory
|
||||
result/
|
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Federico Damián Schonborn <fdschonborn@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@ -0,0 +1,39 @@
|
||||
# AbleScript for Nix
|
||||
|
||||
Nix Flake for AbleScript.
|
||||
|
||||
## Usage
|
||||
|
||||
### Using Nix Run
|
||||
|
||||
```sh
|
||||
$ nix run github:FedericoSchonborn/nix-ablescript#ablescript
|
||||
Hi [AbleScript 0.5.2]
|
||||
:: /*Hello, AbleScript!*/ print;
|
||||
Hello, AbleScript!
|
||||
::
|
||||
```
|
||||
|
||||
### Inside a Nix Shell
|
||||
|
||||
```sh
|
||||
$ nix shell github:FedericoSchonborn/nix-ablescript#ablescript
|
||||
[nix-shell] $ ablescript_cli
|
||||
Hi [AbleScript 0.5.2]
|
||||
:: /*Hello, AbleScript!*/ print;
|
||||
Hello, AbleScript!
|
||||
::
|
||||
```
|
||||
|
||||
### As a Flake
|
||||
|
||||
```nix
|
||||
{
|
||||
inputs = {
|
||||
# Provides:
|
||||
# overlays.default (-> overlays.ablescript)
|
||||
# packages.default (-> packages.ablescript)
|
||||
ablescript.url = "github:FedericoSchonborn/nix-ablescript";
|
||||
};
|
||||
}
|
||||
```
|
@ -0,0 +1,8 @@
|
||||
(import (let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}) {src = ./.;})
|
||||
.defaultNix
|
@ -0,0 +1,59 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1650374568,
|
||||
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1664912021,
|
||||
"narHash": "sha256-ecnQfOSxhbj0x99jcX72lfo193IexLJQ07ojOXMgruY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "603bdef4c7b21a5ae9f23f63950e95c177ff18b5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
flake-compat = {
|
||||
url = "github:edolstra/flake-compat";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {inherit system;};
|
||||
in rec {
|
||||
packages = rec {
|
||||
ablescript = pkgs.callPackage ./packages/ablescript.nix {};
|
||||
default = ablescript;
|
||||
};
|
||||
overlays = rec {
|
||||
ablescript = final: prev: {ablescript = packages.${prev.system}.ablescript;};
|
||||
default = ablescript;
|
||||
};
|
||||
formatter = pkgs.alejandra;
|
||||
});
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchurl,
|
||||
...
|
||||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "ablescript";
|
||||
version = "0.5.2";
|
||||
src = fetchurl {
|
||||
url = "https://git.ablecorp.us/AbleScript/able-script/archive/v${version}.tar.gz";
|
||||
sha256 = "wFmg9BTo2+JSVabWDIQAoLdT7OYuMxLxlvq6yL8g4EM=";
|
||||
};
|
||||
cargoSha256 = "2tBb8FdXknTbgFrjfO5ZM3O9OAnVuLVY/YcL8y/W7nA=";
|
||||
meta = with lib; {
|
||||
description = "A programming language designed to be bad";
|
||||
homepage = "https://git.ablecorp.us/AbleScript/able-script";
|
||||
downloadPage = "https://git.ablecorp.us/AbleScript/able-script/releases";
|
||||
license = licenses.mit;
|
||||
mainProgram = "ablescript_cli";
|
||||
};
|
||||
}
|
Loading…
Reference in new issue