demesisx

joined 2 years ago
MODERATOR OF
[–] demesisx 10 points 11 months ago* (last edited 11 months ago) (4 children)

Secondly, if you DID take him at his word, why? He’s always shown himself to be a liar.

That’s why you don’t throw your support behind people like that. This is a leopards ate my face situation. Open and shut case closed.

[–] demesisx 10 points 11 months ago (5 children)

For one, because he should have known all along. When I support a candidate, I will generally study a candidate’s declared platform…especially as it pertains to me and the future of my job.

[–] demesisx 11 points 11 months ago

I'd definitely use it (and I do) for deploying remote software and for the use cases you mentioned. Still, we can all agree that, in the context of Nixos, native derivations are superior and almost always preferred. I am currently using a flatpak of zen-browser until the derivations can get added to nixpkgs. But that's just a temporary patch that I will remove soon. I have also seen containers outperform Nix in software that strictly enforces the FHS style and doesn't play nicely in the immutable world.

[–] demesisx 7 points 11 months ago (1 children)

You can barely detect your own biases! Have a great day. Continue with the fascist bullshit pretending you are ordained from some higher power.

Fascism is a far-right, authoritarian, and ultranationalist political ideology and movement, characterized by a dictatorial leader, centralized autocracy, militarism, forcible suppression of opposition, belief in a natural social hierarchy, subordination of individual interests for the perceived good of the nation or race, and strong regimentation of society and the economy.

[–] demesisx 10 points 11 months ago

See, now THIS is even more useful.

[–] demesisx 10 points 11 months ago

I know. I pasted this from Reddit. We have like 0 articles here. In fact, if you're doing it this way, you are doing it wrong.

[–] demesisx 8 points 11 months ago (3 children)

Group efforts to root out fascism or other malcontents

You can read those words, right? Who decides what is and isn't fascism? Who decides who is the malcontents in society? See what I mean?

[–] demesisx 9 points 11 months ago

You and pivot_root collectively made my day so much more wholesome. Interactions like these are why I love Lemmy's smallness. Kick back after your long day and relax and thanks for the reply. :)

[–] demesisx 11 points 11 months ago

I’m really glad to hear that. Thank you! This is definitely the best Lemmy app on iOS even with the architecture mistake you mentioned.

I’d also recommend looking into the FRP paradigm for the front end with a purely Functional back end. Even though swift doesn’t have currying anymore, you may be able to REALLY elegantly architect it using that style.

Anyway, when you do, LMK. I’d LOVE to help.

[–] demesisx 9 points 11 months ago

Oh ok. Carry on.

[–] demesisx 12 points 11 months ago

🤌🏼your review is ::chef’s kiss::

Thank you.

[–] demesisx 8 points 11 months ago (2 children)

I can agree that they’re cliches and perhaps thought terminating.

I “have the trolling”. Are you implying that I’m trolling? If I’m trolling, every single hippie in the 60’s was also trolling when they asked for peace.

 

cross-posted from: https://infosec.pub/post/9523257

Purus: Purescript -> UPLC | POA #1

 

cross-posted from: https://infosec.pub/post/9523044

Lambda Buffers Fund9 Closeout Short

 

cross-posted from: https://infosec.pub/post/9428674

I had the (perhaps foolishly ambitious) idea of creating a rolling fork of Lemmy with the intent of modifying the codebase for use in an open source pub sub implementation of retail inventory. But I have to get standard Lemmy working first...and I like to use Nix for everything I do in the dev world (where feasible).

So, I forked the repo and was immediately brought into dev environment hell.

They only offer a choice between:

A.) Docker B.) Ansible C.) Building from scratch.

Two hours of fighting with the scratch build instructions and I eventually had to admit defeat due to some vague dependencies (and general malaise). Though I have completely flakified my Purescript and Haskell dev environments, I have found Rust to be a lot more challenging even on simple projects.

Anyway, I decided to come here to ask: **How easy would it be to flakify the Lemmy repo to add a fourth build option for those of us in the Nix world? **

Can I reference the build instructions from nixpkgs to get close to my intended goal? I need all of the help I can get. Be as pedantic or defeatist as you will. I currently have no skin in this game and merely want to help the Lemmy devs welcome people that are more nixy like myself (if nothing else).

25
submitted 2 years ago* (last edited 2 years ago) by demesisx to c/nix@programming.dev
 

How easy would it be to flakify the Lemmy repo to add a fourth build option for those of us in the Nix world?

I had the (perhaps foolishly ambitious) idea of creating a rolling fork of Lemmy with the intent of modifying the codebase for use in an open source pub sub implementation of retail inventory. But I have to get standard Lemmy working first...and I like to use Nix for everything I do in the dev world (where feasible).

So, I forked the repo and was immediately brought into dev environment hell.

They only offer a choice between:

A.) Docker B.) Ansible C.) Building from scratch.

Two hours of fighting with the scratch build instructions and I eventually had to admit defeat due to some vague dependencies (and general malaise). Though I have completely flakified my Purescript and Haskell dev environments, I have found Rust to be a lot more challenging even on simple projects.

Anyway, I decided to come here to ask: **How easy would it be to flakify the Lemmy repo to add a fourth build option for those of us in the Nix world? **

Can I reference the build instructions from nixpkgs to get close to my intended goal? I need all of the help I can get. Be as pedantic or defeatist as you will. I currently have no skin in this game and merely want to help the Lemmy devs welcome people that are more nixy like myself (if nothing else).


edit: here's a naive attempt. I haven't tested anything other than it being a valid flake. Here's the link to my rolling flakification fork.

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    flake-parts.url = "github:hercules-ci/flake-parts";
    systems.url = "github:nix-systems/default";

    # Dev tools
    treefmt-nix.url = "github:numtide/treefmt-nix";
  };

  outputs = inputs:
    inputs.flake-parts.lib.mkFlake { inherit inputs; } {
      systems = import inputs.systems;
      imports = [
        inputs.treefmt-nix.flakeModule
      ];
      perSystem = { config, self', pkgs, lib, system, ... }:
        let
          cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
          nonRustDeps = [
            pkgs.libiconv
            # Derived from Documentation on Dev installation for Linux
            pkgs.cacert
            pkgs.postgresql
            pkgs.openssl
            pkgs.pkg-config
            pkgs.libpqxx
          ];
          rust-toolchain = pkgs.symlinkJoin {
            name = "rust-toolchain";
            paths = [ pkgs.rustc pkgs.cargo pkgs.cargo-watch pkgs.rust-analyzer pkgs.rustPlatform.rustcSrc pkgs.cacert pkgs.postgresql pkgs.openssl pkgs.pkg-config pkgs.libpqxx ];
          };
        in
        {
          # Rust package
          packages.default = pkgs.rustPlatform.buildRustPackage {
            inherit (cargoToml.package) name version;
            src = ./.;
            cargoLock.lockFile = ./Cargo.lock;
          };

          # Rust dev environment
          devShells.default = pkgs.mkShell {
            inputsFrom = [
              config.treefmt.build.devShell
            ];
            shellHook = ''
              # For rust-analyzer 'hover' tooltips to work.
              export RUST_SRC_PATH=${pkgs.rustPlatform.rustLibSrc}
              export CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true

              echo
              echo "🍎🍎 Run 'just <recipe>' to get started"
              just
            '';
            buildInputs = nonRustDeps;
            nativeBuildInputs = with pkgs; [
              just
              rust-toolchain
            ];
            RUST_BACKTRACE = 1;
          };

          # Add your auto-formatters here.
          # cf. https://numtide.github.io/treefmt/
          treefmt.config = {
            projectRootFile = "flake.nix";
            programs = {
              nixpkgs-fmt.enable = true;
              rustfmt.enable = true;
            };
          };
        };
    };
}

and here's the lemmy-ui flake (which, judging by past forays into tsc with nix last summer, should be a lot easier to create and work with than the Rust library):

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    systems.url = "github:nix-systems/default";
  };

  outputs = {
    systems,
    nixpkgs,
    ...
  } @ inputs: let
    eachSystem = f:
      nixpkgs.lib.genAttrs (import systems) (
        system:
          f nixpkgs.legacyPackages.${system}
      );
  in {
    devShells = eachSystem (pkgs: {
      default = pkgs.mkShell {
        buildInputs = [
          pkgs.nodejs
          # You can set the major version of Node.js to a specific one instead
          # of the default version
          # pkgs.nodejs-19_x

          # You can choose pnpm, yarn, or none (npm).
          pkgs.nodePackages.pnpm
          # pkgs.yarn

          pkgs.nodePackages.typescript
          pkgs.nodePackages.typescript-language-server
        ];
      };
    });
  };
}
view more: ‹ prev next ›