pijul nest
guest [sign in]

begin

toastal
Jun 24, 2025, 12:59 PM
H5TE46JDBGYT7JWLWDX5IU4SRZVCKZTBMFXEECTJXIDFYHO24EVQC

Dependencies

Change contents

  • file addition: shell.nix (----------)
    [2.1]
    # SPDX-License-Identifier: BlueOak-1.0.0
    # SPDX-FileCopyrightText: 2025 toastal <toastal@posteo.net>
    (import ./release.nix).fello-dev-shell
  • file addition: release.nix (----------)
    [2.1]
    # SPDX-License-Identifier: BlueOak-1.0.0
    # SPDX-FileCopyrightText: 2025 toastal <toastal@posteo.net>
    let
    flake_lock = builtins.fromJSON (builtins.readFile ./flake.lock);
    pkgs_src = builtins.fetchTarball {
    url =
    flake_lock.nodes.nixpkgs.locked.url
    or "https://github.com/NixOS/nixpkgs/archive/${flake_lock.nodes.nixpkgs.locked.rev}.tar.gz";
    sha256 = flake_lock.nodes.nixpkgs.locked.narHash;
    };
    pkgs = import pkgs_src {
    overlays = [
    (import ./nix/overlays/default.nix)
    (import ./nix/overlays/development.nix)
    ];
    };
    in
    {
    inherit (pkgs) fello fello-dev-shell;
    fello-vocab = pkgs.factorPackages.fello;
    }
  • file addition: nix (d--r------)
    [2.1]
  • file addition: packages (d--r------)
    [0.914]
  • file addition: vocab.nix (----------)
    [0.936]
    # SPDX-License-Identifier: BlueOak-1.0.0
    # SPDX-FileCopyrightText: 2025 toastal <toastal@posteo.net>
    {
    lib,
    factorPackages,
    }:
    factorPackages.buildFactorVocab {
    pname = "fello";
    version = builtins.readFile ../../VERSION.txt;
    vocabRoot = "extra";
    src =
    let
    fs = lib.fileset;
    factorFilter =
    file:
    lib.lists.any file.hasExt [
    "factor"
    "txt"
    ];
    in
    fs.toSource {
    root = ../../extra;
    fileset = fs.fileFilter factorFilter ../../extra;
    };
    meta = {
    license = lib.licenses.blueOak100;
    };
    }
  • file addition: bin.nix (----------)
    [0.936]
    # SPDX-License-Identifier: BlueOak-1.0.0
    # SPDX-FileCopyrightText: 2025 toastal <toastal@posteo.net>
    {
    lib,
    factorPackages,
    }:
    factorPackages.buildFactorApplication {
    pname = "fello";
    binName = "fello";
    vocabName = "fello.cli";
    version = builtins.readFile ../../VERSION.txt;
    src =
    let
    fs = lib.fileset;
    factorFilter =
    file:
    lib.lists.any file.hasExt [
    "factor"
    "txt"
    ];
    in
    fs.toSource {
    root = ../../extra;
    fileset = fs.fileFilter factorFilter ../../extra;
    };
    enableDefaults = false;
    enableUI = false;
    extraVocabs = with factorPackages; [ ];
    meta = {
    license = lib.licenses.blueOak100;
    };
    }
  • file addition: overlays (d--r------)
    [0.914]
  • file addition: development.nix (----------)
    [0.2430]
    # SPDX-License-Identifier: BlueOak-1.0.0
    # SPDX-FileCopyrightText: 2025 toastal <toastal@posteo.net>
    final: prev: {
    fello-dev-shell = final.mkShellNoCC {
    name = "fello";
    inputsFrom = with final; [
    fello
    ];
    packages = with final; [
    factorPackages.factor-lang
    nixfmt-3-space
    rlwrap # for ``rlwrap factor …``
    ];
    shellHook = ''
    export FACTOR_ROOTS="$FACTOR_ROOTS:$(pwd)/extra"
    export FACTOR_IMAGE="$(pwd)/factor.image"
    '';
    };
    nixfmt-3-space = final.writeTextFile {
    name = "nixfmt-wrapped";
    executable = true;
    destination = "/bin/nixfmt";
    text = # sh
    ''
    #!${final.lib.getExe final.dash}
    exec ${final.lib.getExe final.nixfmt-rfc-style} --indent=3 "$@"
    '';
    checkPhase = ''
    ${final.stdenv.shellDryRun} "$target"
    '';
    meta.mainProgram = "nixfmt";
    };
    }
  • file addition: default.nix (----------)
    [0.2430]
    # SPDX-License-Identifier: BlueOak-1.0.0
    # SPDX-FileCopyrightText: 2025 toastal <toastal@posteo.net>
    final: prev: {
    factorPackages = prev.factorPackages.extend (
    _: _: {
    fello = final.callPackage ../packages/vocab.nix { };
    }
    );
    fello = final.callPackage ../packages/bin.nix { };
    }
  • file addition: flake.nix (----------)
    [2.1]
    # SPDX-License-Identifier: BlueOak-1.0.0
    # SPDX-FileCopyrightText: 2025 toastal <toastal@posteo.net>
    {
    description = "factor-nix-demo";
    inputs = {
    #nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
    # contains a fix for factorPackages.buildFactorVocab
    nixpkgs.url = "github:nixos/nixpkgs?rev=bdcd50506b69b058890e7361027aee9fd690e627";
    };
    outputs =
    { self, nixpkgs, ... }@inputs:
    let
    # covering what what Factor *should* support (this may differ from
    # what Nix actually support, but could/should)
    supportedSystems = builtins.filter (
    system:
    builtins.any (archPrefix: nixpkgs.lib.hasPrefix archPrefix system) [
    "x86_64-"
    "i686-"
    ]
    ) nixpkgs.lib.systems.flakeExposed;
    nixpkgsFor = nixpkgs.lib.genAttrs supportedSystems (
    system:
    import nixpkgs {
    inherit system;
    overlays = [
    (import ./nix/overlays/default.nix)
    (import ./nix/overlays/development.nix)
    ];
    }
    );
    forAllSystems =
    fn:
    nixpkgs.lib.genAttrs supportedSystems (
    system:
    fn rec {
    inherit system;
    pkgs = nixpkgsFor.${system};
    inherit (pkgs) lib;
    }
    );
    in
    {
    overlays = {
    default = import ./nix/overlays/default.nix;
    dev-tools = import ./nix/overlays/development.nix;
    };
    packages = forAllSystems (
    { pkgs, ... }:
    {
    default = pkgs.fello;
    }
    );
    devShells = forAllSystems (
    { pkgs, ... }:
    {
    default = pkgs.fello-dev-shell;
    }
    );
    formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-3-space);
    };
    }
  • file addition: flake.lock (----------)
    [2.1]
    {
    "nodes": {
    "nixpkgs": {
    "locked": {
    "lastModified": 1750747400,
    "narHash": "sha256-ZarsHYqTyIWLemHIpxqw2i7VLMxvLYqhrUZtK1Ymzf4=",
    "owner": "nixos",
    "repo": "nixpkgs",
    "rev": "bdcd50506b69b058890e7361027aee9fd690e627",
    "type": "github"
    },
    "original": {
    "owner": "nixos",
    "repo": "nixpkgs",
    "rev": "bdcd50506b69b058890e7361027aee9fd690e627",
    "type": "github"
    }
    },
    "root": {
    "inputs": {
    "nixpkgs": "nixpkgs"
    }
    }
    },
    "root": "root",
    "version": 7
    }
  • file addition: extra (d--r------)
    [2.1]
  • file addition: fello (d--r------)
    [0.6440]
  • file addition: fello.factor (----------)
    [0.6459]
    ! SPDX-License-Identifier: BlueOak-1.0.0
    ! SPDX-FileCopyrightText: 2025 toastal <toastal@posteo.net>
    USING: io ;
    IN: fello
    : print-hello ( -- ) "Say hello from Nix" print ;
    MAIN: print-hello
  • file addition: cli (d--r------)
    [0.6459]
  • file addition: cli.factor (----------)
    [0.6708]
    ! SPDX-License-Identifier: BlueOak-1.0.0
    ! SPDX-FileCopyrightText: 2025 toastal <toastal@posteo.net>
    USING: fello ;
    IN: fello.cli
    MAIN: print-hello
  • file addition: authors.txt (----------)
    [0.6459]
    toastal
  • file addition: default.nix (----------)
    [2.1]
    # SPDX-License-Identifier: BlueOak-1.0.0
    # SPDX-FileCopyrightText: 2025 toastal <toastal@posteo.net>
    (import ./release.nix).fello
  • file addition: VERSION.txt (----------)
    [2.1]
    0-dev
  • file addition: README.rst (----------)
    [2.1]
    ===============================================================================
    Factor Nix Demo
    ===============================================================================
    -------------------------------------------------------------------------------
    A basic starter for building a Factor project
    -------------------------------------------------------------------------------
    The Factor project is called ``fello`` for Factor + hello (& to not conflict
    with :ac:`GNU` ``hello``).
    License
    ===============================================================================
    This project is licensed under the :t:`Blue Oak Model License, version 1.0.0`
    (``BlueOak-1.0.0``)  — for full tet read ``LICENSE.txt``.
    Pitching in
    ===============================================================================
    Currently this is best done by sending a patchset to
    `toastal+factor-nix-demo@posteo.net
    <mailto:toastal+factor-nix-demo@posteo.net>`_ or :ac:`DM` me a remote to clone
    @ `toastal@toastal.in.th <xmpp:toastal@toastal.in.th>`_.
    Funding / Support
    ===============================================================================
    See choices at the `maker’s website <https://toast.al/funding>`_.
    .. vim: set textwidth=79
  • file addition: LICENSE.txt (----------)
    [2.1]
    # Blue Oak Model License
    Version 1.0.0
    ## Purpose
    This license gives everyone as much permission to work with
    this software as possible, while protecting contributors
    from liability.
    ## Acceptance
    In order to receive this license, you must agree to its
    rules. The rules of this license are both obligations
    under that agreement and conditions to your license.
    You must not do anything with this software that triggers
    a rule that you cannot or will not follow.
    ## Copyright
    Each contributor licenses you to do everything with this
    software that would otherwise infringe that contributor's
    copyright in it.
    ## Notices
    You must ensure that everyone who gets a copy of
    any part of this software from you, with or without
    changes, also gets the text of this license or a link to
    <https://blueoakcouncil.org/license/1.0.0>.
    ## Excuse
    If anyone notifies you in writing that you have not
    complied with [Notices](#notices), you can keep your
    license by taking all practical steps to comply within 30
    days after the notice. If you do not do so, your license
    ends immediately.
    ## Patent
    Each contributor licenses you to do everything with this
    software that would otherwise infringe any patent claims
    they can license or become able to license.
    ## Reliability
    No contributor can revoke this license.
    ## No Liability
    ***As far as the law allows, this software comes as is,
    without any warranty or condition, and no contributor
    will be liable to anyone for any damages related to this
    software or this license, under any kind of legal claim.***
  • file addition: .ignore (----------)
    [2.1]
    # Nix stuff
    result*
    .envrc
    .direnv
    # Factor stuff
    factor.image
    # NO to Microsoft
    devcontainer.json
    *.code-workspace
    .devcontainer
    .github
    .vscode
    # NO to Docker
    *Dockerfile*
    *docker-compose*
    # NO to invasive configs
    .husky
    .pre-commit-config.{yaml,yml}
  • file addition: .editorconfig (----------)
    [2.1]
    # http://editorconfig.org/
    # Tabs are preferred where possible; this is the only accessible choice
    root = true
    [*]
    charset = utf-8
    end_of_line = lf
    insert_final_newline = true
    indent_style = tab
    trim_trailing_whitespace = true
    [VERSION.txt]
    insert_final_newline = false
    [*.factor]
    indent_style = space
    indent_size = 4
    [*.nix]
    indent_style = space
    indent_size = 3
    [*.rst]
    indent_style = unset
    indent_size = unset