How to use this version: 10.1.3.10-1545tr103f5d format in chocolatey nuspec version - nuget-package

How to use version: 10.1.3.10-1545tr103f5d format in chocolatey nuspec version. I want to include git commit id with chocolatey package version.

Simply put, you can't.
Chocolatey uses a non-strict semantic version numbering strategy, meaning that it will support 4 part version numbers, but you can't have a structure that is
major.minor.build.build-number
What you could do is something like the following:
10.1.3.10-g1545tr103f5d
Notice the introduction of the g after the -. As long as you have a non-digit character here, you should be able to complete the choco pack command.

Related

How to install Haskell with a "base" specification?

I want to run a program that demands a specific version of the base package. This version is not the one that comes with my OS's version of Haskell hence I apparently can't use my OS's version of Haskell.
It would be great of conda worked with Haskell the way it works with Python so as to create an environment for a specific version of Haskell, but such is not the case. Nor is it the case that Haskell's sandbox feature permits one to specify a version of base let alone Haskell itself.
PS: Frustratingly, the SE question "How to install an older version of base in Haskell" ended up answering another question without changing the title to reflect the question it did answer.
There is a tool that works even better then conda in Haskell called stack. Version of base is hardwired with version of ghc that is installed. You can get stack installed first and it will install version of the ghc you need automatically:
$ curl -sSL https://get.haskellstack.org/ | sh
This command will automatically install ghc-8.6.5, which is specified by lts-14.22 resolver and will make all packages available for you on demand including base
$ stack --resolver lts-14.22 ghci
To obtain the resolver specification:
Go to this table of all packages that come installed with a
particular GHC version.
If a desired base version is not available, find the scroll bar at
the bottom of the table and scroll to the right until you find one.
Say it is base-4.11.1.0, then look at the header of the column for
the ghc version that ships with this base.
In this example either one of this versions of ghc: 8.4.4, 8.4.3,
8.4.2 will have that version of base.
Go on the stackage.org home page and find in
the matching lastest resolver in the list "Latest LTS per GHC
version".
In this example, any lts-12 will do for the base above.
Latest nightly resolver will always have the newest ghc and base available on stackage.

detect lua version to use [brew switch] conditionally for handling mismatched lua version usage per package

vim8 uses version 5.2.x and another package uses 5.3.x of lua
right now i have set an alias for each package that switches the lua version using brew switch lua 5.2.x / 5.3.x depending on the package.
is there a better way of doing this? i primarily use vim so what id like to do is:
check the lua version being currently used
if it matches vim's version do nothing
if it does not match vims version then `brew switch lua 5.2.x`
then on the other package(s) i can just use the alias.
this way i am not redundantly running the brew switch command for vim every time i call it

How to solve "the package is of bad quality" ubuntu software center

I have the following deb-control:
$cat control
Package: Deb-Package
Version: 2016-Jan-24
Architecture: all
Installed-Size: 252000
Homepage: http://www.google.com
Maintainer: My Name <myemail#gmail.com>
Description: my deb package
and after create my deb package with the command:
dpkg-deb --build <folder>
and then when I try to install it on the ubuntu software center I always get the following notification: "The package is of bad quality ".
How to avoid this dialog ?
At least your package name is invalid. Quoting the manual at https://www.debian.org/doc/debian-policy/ch-controlfields.html:
Package names (both source and binary, see Package, Section 5.6.7)
must consist only of lower case letters (a-z), digits (0-9), plus (+)
and minus (-) signs, and periods (.). They must be at least two
characters long and must start with an alphanumeric character.
Therefore Deb-Package is not allowable, as it contains 2 uppercase characters.
Technically your version string is allowed, but you should keep in mind that it represents Debian revision 24 of version 2016-Jan of your package. You would do better following conventions there too.
Apart from these 2 your control file seems right, but more might be wrong in the package contents itself. In general, Lintian should return no errors, although many small violations are permissible - I have several packages in a private apt repository with errors although they work fine. I do suspect the package name violation is fatal though.

NixOS and ghc-mod - Module not found

I'm experimenting a problem with the interaction between the ghc-mod plugin in emacs, and NixOS 14.04. Basically, once packages are installed via nix-env -i, they are visible from ghc and ghci, recognised by haskell-mode, but not found by ghc-mod.
To avoid information duplication, you can find all details, and the exact replication of the problem in a VM, in the bug ticket https://github.com/kazu-yamamoto/ghc-mod/issues/269
The current, default, package management set up for Haskell on NixOS does work will with packages that use the ghc-api, or similar (ghc-mod, hint, plugins, hell, ...) run time resources. It takes a little more work to create a Nix expression that integrates them well into the rest of the environment. It is called making a wrapper expression for the package, for an example look at how GHC is installed an operates on NixOS.
It is reasonable that this is difficult since you are trying to make a install procedure that is atomic, but interacts with an unknown number of other system packages with their own atomic installs and updates. It is doable, but there is a quicker work around.
Look at this example on the install page on the wiki. Instead of trying to create a ghc-mod package that works atomically you weld it on to ghc so ghc+ghc-mod is an atomic update.
I installed ghc+ghc-mod with the below install script added to my ~/.nixpkgs/nixpkgs.nix file.
hsEnv = haskellPackages.ghcWithPackages (self : [
self.ghc
self.ghcMod
# add more packages here
]);
Install package with something like:
nix-env -i hsEnv
or better most of the time:
nix-env -iA nixpkgs.haskellPackages.hsEnv
I have an alias for the above so I do not have to type it out every time. It is just:
nixh hsEnv
The down side of this method is that other Haskell packages installed with nix-env -i[A] will not work with the above installation. If I wanted to get everything working with the lens package then I would have to alter the install script to include lens like:
hsEnv = haskellPackages.ghcWithPackages (self : [
self.ghc
self.ghcMod
self.lens
# add more packages here
]);
and re-install. Nix does not seem to use a different installation for lens or ghc-mod in hsEnv and with the ghc from nix-env -i ghc so apparently only a little more needs to happen behind the scenes most of the time to combine existing packages in the above fashion.
ghc-mod installed fine with the above script but I have not tested out its integration with Emacs as of yet.
Additional notes added to the github thread
DanielG:
I'm having a bit of trouble working with this environment, I can't even get cabal install to behave properly :/ I'm just getting lots of errors like:
With Nix and NixOS you pretty much never use Cabal to install at the global level
Make sure to use sandboxes, if you are going to use cabal-install. You probably do not need it but its there and it works.
Use ghcWithPackages when installing packages like ghc-mod, hint, or anything needs heavy runtime awareness of existing package (They are hard to make atomic and ghcWithPackages gets around this for GHC).
If you are developing install the standard suite of posix tools with nix-env -i stdenv. NixOS does not force you to have your command line and PATH cultured with tools you do not necessarily need.
cabal assumes the existence a few standard tools such as ar, patch(I think), and a few others as well if memory services me right.
If you use the standard install method and/or ghcWithPackages when needed then NixOS will dedup, on a package level (If you plot a dependency tree they will point to the same package in /nix/store, nix-store --optimise can always dedup the store at a file level.), many packages automatically unlike cabal sandboxes.
Response to comment
[carlo#nixos:~]$ nix-env -iA nixos.pkgs.hsEnv
installing `haskell-env-ghc-7.6.3'
these derivations will be built:
/nix/store/39dn9h2gnp1pyv2zwwcq3bvck2ydyg28-haskell-env-ghc-7.6.3.drv
building path(s) `/nix/store/minf4s4libap8i02yhci83b54fvi1l2r-haskell-env-ghc-7.6.3'
building /nix/store/minf4s4libap8i02yhci83b54fvi1l2r-haskell-env-ghc-7.6.3
collision between `/nix/store/1jp3vsjcl8ydiy92lzyjclwr943vh5lx-ghc-7.6.3/bin/haddock' and `/nix/store/2dfv2pd0i5kcbbc3hb0ywdbik925c8p9-haskell-haddock-ghc7.6.3-2.13.2/bin/haddock' at /nix/store/9z6d76pz8rr7gci2n3igh5dqi7ac5xqj-builder.pl line 72.
builder for `/nix/store/39dn9h2gnp1pyv2zwwcq3bvck2ydyg28-haskell-env-ghc-7.6.3.drv' failed with exit code 2
error: build of `/nix/store/39dn9h2gnp1pyv2zwwcq3bvck2ydyg28-haskell-env-ghc-7.6.3.drv' failed
It is the line that starts with collision that tells you what is going wrong:
collision between `/nix/store/1jp3vsjcl8ydiy92lzyjclwr943vh5lx-ghc-7.6.3/bin/haddock' and `/nix/store/2dfv2pd0i5kcbbc3hb0ywdbik925c8p9-haskell-haddock-ghc7.6.3-2.13.2/bin/haddock' at /nix/store/9z6d76pz8rr7gci2n3igh5dqi7ac5xqj-builder.pl line 72.
It is a conflict between two different haddocks. Switch to a new profile and try again. Since this is a welding together ghc+packages it should not be installed in a profile with other Haskell packages. That does not stop you from running binaries and interrupters from both packages at once, they just need to be in their own name space so when you call haddock, cabal, ghc, there is only one choice per profile.
If you are not familiar with profiles yet you can use:
nix-env -S /nix/var/nix/profiles/per-user/<user>/<New profile name>
The default profile is either default or channels do not which one it will be for your set up. But check for it so you can switch back to it later. There are some tricks so that you do not have to use the /nix/var/nix/profiles/ directory to store you profiles to cut down on typing but that is the default location.

How to select the software's version in gentoo by emerge?

I want to install django 1.4, but the default install version is 1.3.2, how can I change the version to install.
I only know that to change dir to /usr/portage/dev-python/django and install the django1.4's .ebuild file
Is there another way? I read the use flag document but not found the way...
Like this :
emerge =django-1.4
You can check what package versions are available:
equery list -po vim
Select required package with atom notation
emerge -av =app-editors/vim-7.4.273
emerge -av =dev-python/django-1.4
As long as there is an ebuild available, it will be merged or show a hint about unmasking the requested version number. For our example this should do the trick:
echo =dev-python/django-1.4 >> /etc/portage/package.keywords
To stick with that version, be sure to mask higher versions by adding an entry to /etc/portage/package.mask:
echo >=dev-python/django-1.4 >> /etc/portage/package.mask
but careful with that... it might break updates in the future...

Resources